@@ -7,10 +7,10 @@ class Convertor {
7
7
constructor ( schema ) {
8
8
this . schema = JSON . parse ( JSON . stringify ( schema ) )
9
9
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' , ]
12
12
this . referencedSchemas = { }
13
- this . bannedKeyWords = [ '$schema' , '$comment' , '$id' , 'version' , 'examples' , 'id' ]
13
+ this . bannedKeyWords = [ '$schema' , '$comment' , '$id' , 'version' , 'examples' , 'id' , ]
14
14
15
15
this . components = {
16
16
schemas : { }
@@ -184,6 +184,14 @@ class Convertor {
184
184
delete path . reduce ( ( previous , current ) => previous [ current ] , this . schema ) [ pathKey ]
185
185
}
186
186
187
+ const removeDefinitions = (
188
+ schema ,
189
+ ) => {
190
+ delete schema . definitions
191
+ }
192
+
193
+ traverse ( this . schema , removeDefinitions )
194
+
187
195
this . removeEmpty ( this . schema )
188
196
189
197
// force remove definitions
0 commit comments