Skip to content

Commit

Permalink
Add default value for enum metadata type
Browse files Browse the repository at this point in the history
Co-authored-by: Kamil Mysliwiec <[email protected]>
  • Loading branch information
quangtran88 and kamilmysliwiec authored Aug 28, 2023
1 parent b517b7f commit 54f35c5
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 @@ -294,7 +294,7 @@ export class SchemaObjectFactory {

if (!(enumName in schemas)) {
schemas[enumName] = {
type: metadata.type as string,
type: metadata.type as string ?? 'string',
enum:
metadata.isArray && metadata.items
? metadata.items['enum']
Expand Down

0 comments on commit 54f35c5

Please sign in to comment.