Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where is the schema instance for 3.1? #2371

Closed
adamaltman opened this issue Oct 10, 2020 · 6 comments
Closed

Where is the schema instance for 3.1? #2371

adamaltman opened this issue Oct 10, 2020 · 6 comments

Comments

@adamaltman
Copy link
Contributor

I left a comment here, but since the pull request was already merged, I decided to open this issue.

I wonder if this URL should resolve to some content (instead of a 404): https://spec.openapis.org/oas/3.1/schema-object

I was expecting a meta schema object at that URL.

@MikeRalphson
Copy link
Member

MikeRalphson commented Oct 10, 2020

No, JSON Schema vocabularies are referenced by URI not URLs, so this is not expected to resolve to anything. We can probably make this clearer in the spec.

@adamaltman
Copy link
Contributor Author

When I go here: https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.5 I can access that URI via my browser and download the meta-schema. I think this is what I find confusing.

@MikeRalphson
Copy link
Member

The current schema instance for OAS 3.0 has an id of https://spec.openapis.org/oas/3.0/schema/2019-04-02 (which is a URI not a URL, as required by JSON Schema). It is currently located at https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json

We can possibly do better in automatically publishing changed schema instances via our gh-pages branch which will cause them to show up under the spec.openapis.org domain. (PRs from GitHub Actions wizards gratefully received.)

There is no current schema instance for OAS 3.1, as that release is still a work-in-progress.

Because of this confusion between the dialect $schema value describing the schemaObject and a schema instance I will propose changing the $schema value in an upcoming PR.

@MikeRalphson MikeRalphson self-assigned this Oct 14, 2020
@MikeRalphson MikeRalphson changed the title Where is the schema object for 3.1? Where is the schema instance for 3.1? Nov 5, 2020
@MikeRalphson
Copy link
Member

Linked issue #2314

@Relequestual
Copy link
Contributor

When I go here: https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.5 I can access that URI via my browser and download the meta-schema. I think this is what I find confusing. - @adamaltman

Worth noting that JSON Schema 2020-12, while published, hasn't published the associated meta-schema files yet.

Meta-schemas are informative only, and we may also update them (as per the spec) to fix any issues where it doesn't match the spec.

@MikeRalphson
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants