mikunn / openapi-schema-to-json-schema

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

Throw on invalid type #6

Closed mikunn closed 6 years ago

mikunn commented 6 years ago

Since the data type conversion from Common Names to type/format pairs is dropped in version 2.0.0, we should accept only types defined by OpenAPI spec and throw if something else is encountered.

Currently e.g. type: dateTime is silently passed through to the JSON schema which leads to an invalid schema.