OpenAPI-Specification icon indicating copy to clipboard operation
OpenAPI-Specification copied to clipboard

Updated (draft 2020-12) json schema for openapi v3.0 spec

Open chris-smith-zocdoc opened this issue 2 years ago • 3 comments

Currently the openapi v3.0 schema is using draft-04 of json schema. Would it be possible to get an updated version of the schema using Draft 2019-09 or 2020-12?

We are currently using openapi v3.0 and would like to validate the specifications using json schema, but the libraries tend only only support a limited number of json schema versions, having a more recent version of the specification available would help.

chris-smith-zocdoc avatar Aug 09 '22 13:08 chris-smith-zocdoc

You can use this new tool to automatically transform a draft-04 schema to a newer version. https://alterschema.sourcemeta.com/

jdesrosiers avatar Aug 09 '22 17:08 jdesrosiers

That looks promising, thanks @jdesrosiers

chris-smith-zocdoc avatar Aug 09 '22 17:08 chris-smith-zocdoc

There's an appetite to move to newer specs but draft 4 will be supported for quite some time and most all tooling should still support it. There are some very large projects on draft 4 still, like MongoDB

jeremyfiel avatar Aug 10 '22 19:08 jeremyfiel