You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -60,25 +60,19 @@ If set to `true`, all local and remote references (http/https and file) $refs wi
60
60
61
61
## Why?
62
62
63
-
OpenAPI is often described as an extension of JSON Schema, but both specs have changed over time and grown independently. OpenAPI v2 was based on JSON Schema draft v4 with a long list of deviations, but OpenAPI v3 shrank that list, upping their support to draft v4 and making the list of discrepancies shorter. Despite OpenAPI v3 closing the gap, the issue of JSON Schema divergence has not been resolved fully.
63
+
OpenAPI is often described as an extension of JSON Schema, but both specs have changed over time and grown independently. OpenAPI v2 was based on JSON Schema draft v4 with a long list of deviations, but OpenAPI v3 shrank that list, upping their support to draft v4 and making the list of discrepancies shorter. This has been solved for OpenAPI v3.1, but for those using OpenAPI v3.0, you can use this tool to solve [the divergence](https://apisyouwonthate.com/blog/openapi-and-json-schema-divergence).
64
64
65
65

66
66
67
-
Carefully writing JSON Schema for your data model kiiiinda works, but it is possible to write JSON Schema that creates invalid OpenAPI, and vice versa. For more on this, read the article [_OpenAPI and JSON Schema Divergence_](https://blog.apisyouwonthate.com/openapi-and-json-schema-divergence-part-1-1daf6678d86e).
68
-
69
67
This tool sets out to allow folks to convert from JSON Schema (their one source of truth for everything) to OpenAPI (a thing for HTML docs and making SDKs).
_† Draft v5 is also known as Draft Wright 00, as the drafts are often named after the author, and this was the first one by A. Wright. Amongst other things, draft v5 aimed to rewrite the meta files, but the experiment failed, meaning we need to continue to use the draft v4 metafiles. Ugh._
77
75
78
-
## TODO
79
-
80
-
-[ ] Support later JSON Schema drafts via [cloudflare/json-schema-transformer] when it adds that functionality
81
-
82
76
## Converting Back
83
77
84
78
To convert the other way, check out [openapi-schema-to-json-schema], which this package was based on.
@@ -93,7 +87,7 @@ npm test
93
87
94
88
## Thanks
95
89
96
-
-[Stoplight][] for donating time and effort to this project, and many more.
90
+
-[Stoplight][] for [donating time and effort](https://stoplight.io/blog/companies-supporting-open-source/) to this project, and many more.
97
91
-[mikunn][] for creating [openapi-schema-to-json-schema] which this is based on.
98
92
-[Phil Sturgeon][] for flipping that conversion script about face.
0 commit comments