oascvt
v1.0.0
Published
convert OpenAPI 3.1 specs into OpenAPI 3.0.3-compatible
Readme
oascvt
A small utility to convert OpenAPI 3.1 specs into OpenAPI 3.0.3-compatible specs for tools like Postman that do not support 3.1 yet.
What it does
- Rewrites
openapi: "3.1.x"→openapi: "3.0.3" - Converts
type: "null"and["T","null"]→nullable: true - Converts
oneOf/anyOfwithnullintonullable: true - Removes
nullvalues fromenumand addsnullable: true - Simplifies
anyOfof string enums into oneenum - Collapses single-element
anyOf/oneOf
Usage
node oascvt.js input.json output.json