mikunn / openapi-schema-to-json-schema

Converts OpenAPI Schema Object to JSON Schema
75 stars 6 forks source link

Add custom properties for `additionalItems`, `dependencies`, `oneOf`, `anyOf`, `not` #27

Open ehmicky opened 6 years ago

ehmicky commented 6 years ago

OpenAPI 2/3 does not allow the following JSON schema v4 keywords: additionalItems, dependencies. OpenAPI 2 does not allow the following JSON schema v4 keywords: oneOf, anyOf, not.

We could allow users to specify x-additionalItems, x-dependencies (and so on) in the OpenAPI schema, and strip the x- prefix during conversion.

If this sounds good, I can submit a PR.