File tree Expand file tree Collapse file tree 4 files changed +9
-10
lines changed Expand file tree Collapse file tree 4 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -394,4 +394,4 @@ export const convertDefinition = (
394394 } ;
395395
396396 return convertType ( def , commonSchema ) ;
397- } ;
397+ } ;
Original file line number Diff line number Diff line change @@ -140,6 +140,6 @@ export const convertToOpenapiSchemas = async (
140140 jsonSchemas : TJS . Definition ,
141141) : Promise < SchemaMapping > => {
142142 const convertedJsonSchemas = convertToOpenapiTypes ( jsonSchemas ) ;
143- const openapiSchemas = await convertDefinition ( convertedJsonSchemas ) as SchemaMapping ;
143+ const openapiSchemas = convertDefinition ( convertedJsonSchemas ) as SchemaMapping ;
144144 return escapeSchemaNames ( openapiSchemas ) ;
145145} ;
Original file line number Diff line number Diff line change @@ -24,4 +24,4 @@ export interface ObjectSchemaObject extends OpenAPIV3.NonArraySchemaObject {
2424 properties : {
2525 [ name : string ] : Schema ,
2626 } ,
27- }
27+ }
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export const isIntegerSchemaObject = (
2727 if ( isReferenceObject ( schema ) ) {
2828 return false ;
2929 }
30- if ( schema . type && schema . type === 'integer' ) {
30+ if ( schema . type === 'integer' ) {
3131 return true ;
3232 }
3333 return false ;
@@ -104,10 +104,9 @@ export const isNullableObject = (schema: Schema) => {
104104} ;
105105
106106export function isEmptyObject ( obj : Object ) {
107- if ( Object . keys ( obj ) . length === 0 ) return true ;
107+ if ( Object . keys ( obj ) . length === 0 ) {
108+ return true ;
109+ }
108110
109- for ( const t of Object . values ( obj ) ) {
110- if ( t !== undefined ) return false ;
111- }
112- return true ;
113- }
111+ return Object . values ( obj ) . every ( ( v ) => v === undefined ) ;
112+ }
You can’t perform that action at this time.
0 commit comments