Skip to content

Commit

Permalink
Fix open api specs for MULTI_SELECT
Browse files Browse the repository at this point in the history
  • Loading branch information
martmull committed Nov 14, 2024
1 parent d72068e commit 8f0e97c
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,18 @@ const getSchemaComponentsProperties = ({
let itemProperty = {} as Property;

switch (field.type) {
case FieldMetadataType.SELECT:
case FieldMetadataType.MULTI_SELECT:
itemProperty = {
type: 'array',
items: {
type: 'string',
enum: field.options.map(
(option: { value: string }) => option.value,
),
},
};
break;
case FieldMetadataType.SELECT:
itemProperty = {
type: 'string',
enum: field.options.map((option: { value: string }) => option.value),
Expand Down

0 comments on commit 8f0e97c

Please sign in to comment.