File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -409,12 +409,12 @@ export class SchemaObjectFactory {
409409 schemas [ enumName ] = {
410410 type : enumType ,
411411 ...metadata . enumSchema ,
412- description : metadata . description ,
412+ description : metadata . description ?? undefined ,
413413 enum :
414414 metadata . isArray && metadata . items
415415 ? metadata . items [ 'enum' ]
416416 : metadata . enum ,
417- 'x-enumNames' : metadata [ 'x-enumNames' ] ?? [ ]
417+ 'x-enumNames' : metadata [ 'x-enumNames' ] ?? undefined
418418 } ;
419419 } else {
420420 if ( metadata . enumSchema ) {
@@ -435,7 +435,9 @@ export class SchemaObjectFactory {
435435 type : metadata . isArray ? 'array' : 'string'
436436 } ;
437437
438- const refHost = metadata . isArray ? { items : { $ref } } : { $ref } ;
438+ const refHost = metadata . isArray
439+ ? { items : { $ref } }
440+ : { allOf : [ { $ref } ] } ;
439441
440442 const paramObject = { ..._schemaObject , ...refHost } ;
441443 const pathsToOmit = [ 'enum' , 'enumName' , 'enumSchema' ] ;
You can’t perform that action at this time.
0 commit comments