Skip to content

Releases: mikunn/openapi-schema-to-json-schema

v2.2.0

09 Sep 16:37
Compare
Choose a tag to compare

Add

  • fromParameter function to convert OpenAPI Parameter object to JSON schema
  • OpenAPI formats int32, int64, float and double get minimum and maximum values in the output JSON schema to restrict the possible value range
  • OpenAPI format byte gets pattern in the output JSON schema to loosely enforce base64 encoded string

Fix

  • InvalidTypeError was not displayed correctly

v2.1.0

04 Apr 12:54
Compare
Choose a tag to compare

Change

If an invalid type (other than integer, number, string, boolean, object or array) is encountered, throws InvalidTypeError to help building valid schemas.

v2.0.0

04 Apr 06:55
Compare
Choose a tag to compare

Change

Drop data type conversion from Common Names to type/format.

In previous version e.g. type: "dateTime" was converted to type type: "string" with format: "date-time". In this version type and format are left untouched.

v1.2.0

17 Nov 13:30
Compare
Choose a tag to compare

Add removeReadOnly and removeWriteOnly options.

v1.1.0

17 Nov 09:15
Compare
Choose a tag to compare

Add option keepNotSupported (array) to retain selected fields that are not supported by JSON Schema Draft 4 and are otherwise removed from the result schema.

The fields are as follows: nullable, discriminator, readOnly, writeOnly, xml, externalDocs, example and deprecated.

Initial release

07 Nov 11:23
Compare
Choose a tag to compare

Changed from version 0.2.5:

  • default handler of patternProperties will change the value of additionalProperties (if present) to false if the additionalProperties object is deeply equal to to one of the patterns in patternProperties