@@ -7,10 +7,10 @@ class Convertor {
77 constructor ( schema ) {
88 this . schema = JSON . parse ( JSON . stringify ( schema ) )
99
10- this . specialProperties = [ 'allOf' , 'anyOf' , 'items' , 'oneOf' , 'not' , 'properties' , 'additionalProperties' ]
11- this . ofProperties = [ 'allOf' , 'anyOf' , 'oneOf' ]
10+ this . specialProperties = [ 'allOf' , 'anyOf' , 'items' , 'oneOf' , 'not' , 'properties' , 'additionalProperties' , ]
11+ this . ofProperties = [ 'allOf' , 'anyOf' , 'oneOf' , ]
1212 this . referencedSchemas = { }
13- this . bannedKeyWords = [ '$schema' , '$comment' , '$id' , 'version' , 'examples' , 'id' ]
13+ this . bannedKeyWords = [ '$schema' , '$comment' , '$id' , 'version' , 'examples' , 'id' , ]
1414
1515 this . components = {
1616 schemas : { }
@@ -184,6 +184,14 @@ class Convertor {
184184 delete path . reduce ( ( previous , current ) => previous [ current ] , this . schema ) [ pathKey ]
185185 }
186186
187+ const removeDefinitions = (
188+ schema ,
189+ ) => {
190+ delete schema . definitions
191+ }
192+
193+ traverse ( this . schema , removeDefinitions )
194+
187195 this . removeEmpty ( this . schema )
188196
189197 // force remove definitions
0 commit comments