Skip to content

Releases: apiture/openapi-down-convert

v0.13.2

23 Apr 15:25
831e627
Compare
Choose a tag to compare

correction for v0.13.1 which did not get all the fixes for #24 and #26

v0.13.0

15 Mar 21:51
99e45e9
Compare
Choose a tag to compare

Removed JSON schema patternProperties (fixed #20 )

v0.12.0

13 Mar 23:37
997ed6f
Compare
Choose a tag to compare

Fixes #18

v0.11.0

01 Feb 14:03
e0dfbdf
Compare
Choose a tag to compare

Adds logic to remove the top-level webhooks object, if one exists.
(This deletion is logged.)

v0.10.0

19 Jan 17:36
7e30ca0
Compare
Choose a tag to compare
  • now deletes $comment unless new CLI option --convert-schema-comments is used (if used, $comment is converted to x-comment)
  • Converts contentEncoding: base64 to format: byte in type: string schemas
  • Converts contentMediaType: 'application/octet-stream' to format: binaryintype: string` schemas

v0.9.0

22 Nov 21:30
fe59bc9
Compare
Choose a tag to compare

Tool now renames $comment in schemas to x-comment

v0.8.0

27 Jun 20:47
cf364ed
Compare
Choose a tag to compare

Require a CLI option ( --oidc-to-oauth2 ) to enable the conversion of openIdConnect security to oauth2 security (which allows defining descriptions for the scopes, which is not supported with openIdConnect )

v0.7.0

10 Apr 12:42
c171583
Compare
Choose a tag to compare

Fixes some doc bugs

Adds a new conversion: remove info.license.identifier

v0.6.0

02 Mar 17:19
c5b82d9
Compare
Choose a tag to compare

Second pre-release. This adds support for a few more conversions:

Convert type arrays to nullable

If a schema has a type array of exactly two values, and one of them
is the string 'null', the type is converted to the non-null string item,
and nullable: true added to the schema.

For example:

    myResponse:
      title: My Response
      description: Response from an API operation
      type: [ object, 'null' ]
      allOf:
        ...

becomes

    myResponse:
      title: My Response
      description: Response from an API operation
      type: object
      nullable: true
      allOf:
        ...

and

    myResponse:
      title: My Response
      description: Response from an API operation
      type: arrray
      items:
        type: [ 'string', 'null' ]
        ...

becomes

    myResponse:
      title: My Response
      description: Response from an API operation
      type: arrray
      items:
        type: string
        nullable: true
        ...

This transformation does not handle more complex type array
scenarios such as

   type: [ number, string, boolean, 'null']

To support that, the schema would need to be recast using oneOf,
but this is not trivial do to other schema attributes that may
be possible (properties, allOf etc.)

(Contributions welcome.)

Remove unevaluatedProperties

The tool removes the unevaluatedProperties value, introduced in later
versions of JSON Schema,
as this is not supported in OAS 3.0 JSON Schema Draft 7
used in OAS 3.0.

    myResponse:
      title: My Response
      description: Response from an API operation
      type: object
      unevaluatedProperties: false
      allOf:
        ...

becomes

    myResponse:
      title: My Response
      description: Response from an API operation
      type: object
      unevaluatedProperties: false
      allOf:
        ...

Remove schema $id and $schema

The tool removes any $id or $schema keywords that may appear
inside schema objects.