question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Documentation on JSON Schema compatibility/divergance?

See original GitHub issue

Hey there!

Great work so far getting Open API v3.0 ready, you folks are crushing it. Good luck with the upcoming release.

My initial goal, and my idea of a perfect workflow for API specification, is JSON Schema based contracts. I want JSON Schema files for each resource in each API, being utilized in multiple ways, only one of which is documentation.

I moved away from API Blueprint to achieve this workflow, and Open API v2.0 is moving me a bit closer, but not really. My definitions are broken up into multiple .json files, but they’re not JSON Schema. They’re a mess of Swagger v2.0, vendor extensions, and backported features like example and nullable supported by ReDoc.

In https://github.com/OAI/OpenAPI-Specification/issues/229 I spoke to @webron and @darrelmiller about some of this, but that was a specific conversation about "type": ["string", "null"] vs nullable: true. This is only one difference.

Where can I find out what other differences exist between JSON Schema Draft v4 and Open API Schema objects.

If I can find a full list, maybe I could build a conversion script to get me my JSON Schema files. I know v3.0 is way more in line with JSON Schema than v2.0 is, but I really need specifics on this, and those are hard to find.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
duartealexfcommented, Jan 17, 2018

The differences between JSON Schema and the OpenAPI Schema Object are listed here

the correct link for the documentation is now: https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/versions/3.0.0.md

Some more converters for js:

1reaction
darrelmillercommented, Jul 12, 2017

We are based off the draft-00 version here https://tools.ietf.org/html/draft-wright-json-schema-00

The differences between JSON Schema and the OpenAPI Schema Object are listed here https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/versions/3.0.md#properties in the list right after the list of properties that are unchanged.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenAPI and JSON Schema Divergence: Part 1
This article is going to explain the divergence between OpenAPI and JSON Schema, which I've been calling the subset/superset/sideset problem ...
Read more >
OpenAPI and JSON Schema: When to Use Which
There was a divergence that led to a roughly 80% compatibility with JSON Schema Draft 4. OpenAPI v3.0 took us to 90% compatibility...
Read more >
Understanding JSON Schema Compatibility - Robert Yokota
A JSON Schema can be represented as a JSON object or a boolean. In the case of a boolean, the value true will...
Read more >
Solving OpenAPI and JSON Schema Divergence - Medium
My previous article explained the divergence between OpenAPI and JSON Schema (a.k.a the subset/superset/sideset problem), and promised solutions.
Read more >
Introducing SchemaVer for semantic versioning of schemas
For SemVer, backwards compatibility is about providing guarantees (through ... We have an existing JSON Schema, let's call this 1-0-0 :.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found