File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -409,12 +409,12 @@ export class SchemaObjectFactory {
409
409
schemas [ enumName ] = {
410
410
type : enumType ,
411
411
...metadata . enumSchema ,
412
- description : metadata . description ,
412
+ description : metadata . description ?? undefined ,
413
413
enum :
414
414
metadata . isArray && metadata . items
415
415
? metadata . items [ 'enum' ]
416
416
: metadata . enum ,
417
- 'x-enumNames' : metadata [ 'x-enumNames' ] ?? [ ]
417
+ 'x-enumNames' : metadata [ 'x-enumNames' ] ?? undefined
418
418
} ;
419
419
} else {
420
420
if ( metadata . enumSchema ) {
@@ -435,7 +435,9 @@ export class SchemaObjectFactory {
435
435
type : metadata . isArray ? 'array' : 'string'
436
436
} ;
437
437
438
- const refHost = metadata . isArray ? { items : { $ref } } : { $ref } ;
438
+ const refHost = metadata . isArray
439
+ ? { items : { $ref } }
440
+ : { allOf : [ { $ref } ] } ;
439
441
440
442
const paramObject = { ..._schemaObject , ...refHost } ;
441
443
const pathsToOmit = [ 'enum' , 'enumName' , 'enumSchema' ] ;
You can’t perform that action at this time.
0 commit comments