Releases: apiture/openapi-down-convert
BugFix - remove propertyNames
The propertyNames
JSON Schema keyword from JSON Schema Draft 6 is not available in OpenAPI 3.0.x.
This update removes propertyNames
along with other JSON Schema keywords not supported by OAS 3.0/JSON Schema.
v0.13.2
v0.13.0
v0.12.0
v0.11.0
Adds logic to remove the top-level webhooks
object, if one exists.
(This deletion is logged.)
v0.10.0
- now deletes
$comment
unless new CLI option--convert-schema-comments
is used (if used,$comment
is converted tox-comment
) - Converts
contentEncoding: base64
toformat: byte
intype: string
schemas - Converts
contentMediaType: 'application/octet-stream' to
format: binaryin
type: string` schemas
v0.9.0
Tool now renames $comment
in schemas to x-comment
v0.8.0
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
Fixes some doc bugs
Adds a new conversion: remove info.license.identifier
v0.6.0
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.