Skip to content

Commit 8f0e97c

Browse files
committed
Fix open api specs for MULTI_SELECT
1 parent d72068e commit 8f0e97c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

packages/twenty-server/src/engine/core-modules/open-api/utils/components.utils.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,18 @@ const getSchemaComponentsProperties = ({
115115
let itemProperty = {} as Property;
116116

117117
switch (field.type) {
118-
case FieldMetadataType.SELECT:
119118
case FieldMetadataType.MULTI_SELECT:
119+
itemProperty = {
120+
type: 'array',
121+
items: {
122+
type: 'string',
123+
enum: field.options.map(
124+
(option: { value: string }) => option.value,
125+
),
126+
},
127+
};
128+
break;
129+
case FieldMetadataType.SELECT:
120130
itemProperty = {
121131
type: 'string',
122132
enum: field.options.map((option: { value: string }) => option.value),

0 commit comments

Comments
 (0)