You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ The purpose of this project is to fill the grap by doing the conversion between
19
19
* for example `type: "dateTime"` becomes `type: "string"` with `format: "date-time"`
20
20
* deletes `nullable` and adds `"null"` to `type` array if `nullable` is `true`
21
21
* supports deep structures with nested `allOf`s etc.
22
-
* removes [OpenAPI specific properties](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#fixed-fields-20) such as `discriminator`, `deprecated` etc.
22
+
* removes [OpenAPI specific properties](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#fixed-fields-20) such as `discriminator`, `deprecated` etc. unless specified otherwise
23
23
* optionally supports `patternProperties` with `x-patternProperties` in the Schema Object
24
24
25
25
**NOTE**: `$ref`s are not dereferenced. Use a dereferencer such as [json-schema-ref-parser](https://www.npmjs.com/package/json-schema-ref-parser) prior to using this package.
@@ -96,6 +96,10 @@ prints
96
96
}
97
97
```
98
98
99
+
#### `keepNotSupported` (array)
100
+
101
+
By default, the following fields are removed from the result schema: `nullable`, `discriminator`, `readOnly`, `writeOnly`, `xml`, `externalDocs`, `example` and `deprecated` as they are not supported by JSON Schema Draft 4. Provide an array of the ones you want to keep (as strings) and they won't be removed.
102
+
99
103
#### `supportPatternProperties` (boolean)
100
104
101
105
If set to `true` and `x-patternProperties` property is present, change `x-patternProperties` to `patternProperties` and call `patternPropertiesHandler`. If `patternPropertiesHandler` is not defined, call the default handler. See `patternPropertiesHandler` for more information.
0 commit comments