Skip to content

Commit

Permalink
if enum is of type array, use the item type
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Kraft committed Mar 9, 2024
1 parent 16d1ea9 commit 7230915
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/services/schema-object-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export class SchemaObjectFactory {
: undefined;

schemas[enumName] = {
type: param.schema?.['type'] ?? 'string',
type: (param.isArray ? param.schema?.['items']?.['type'] : param.schema?.['type']) ?? 'string',
enum: _enum
};
}
Expand Down

0 comments on commit 7230915

Please sign in to comment.