Skip to content

schema.json files were removed #4149

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

Closed
leandrodamascena opened this issue Oct 21, 2024 · 6 comments
Closed

schema.json files were removed #4149

leandrodamascena opened this issue Oct 21, 2024 · 6 comments

Comments

@leandrodamascena
Copy link

Hello everyone! I saw in this PR that the files https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json and https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.0/schema.json were removed because they should not be the source of truth. It turns out that I use these files a lot in my CI to compare and validate my OpenAPI schemas in many tests. I download and store them, but I update the file every 1 hour and now it's failing and breaking my CI.

I generate my OpenAPI schemas in JSON and not in YAML, which is a practice used by many and accepted by the specification.
Is there any chance to revert this change?

Thanks.

@ThomasRooney
Copy link

ThomasRooney commented Oct 21, 2024

Note: this also broke schemastore (reporting in the Slack at https://open-api.slack.com/archives/C0EDH2QKD/p1729499316054029) -- i.e. IDE type hinting globally for OpenAPI files.

  1. Schemastore is how almost every IDE/editor gets intellisense/auto-complete for arbitrary json/yaml files. It's pointed at https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json
  2. When it's configured right, users of OpenAPI see auto-complete like the following (attached). This is a really nice DX.
  3. Since that change got merged, developers will start to see some kind of "JSON Schema Error" error, and no auto-complete (attached) in their editors. There's usually a caching period / expiry but I'm personally seeing it now.
  4. Schemastore URIs are in https://github.com/SchemaStore/schemastore/blob/master/src/api/json/catalog.json#L3644-L3651. We could update that to point at somewhere else, but I think it's relatively clean to use this github repo's main branch as the "source of truth".

Can we bring them back 🙏

Screenshot 2024-10-21 at 11 58 29 Screenshot 2024-10-21 at 11 58 54 Screenshot 2024-10-21 at 12 01 08

@ralfhandl
Copy link
Contributor

ralfhandl commented Oct 21, 2024

@ralfhandl
Copy link
Contributor

ralfhandl commented Oct 21, 2024

@leandrodamascena Thanks for reporting this!

@ThomasRooney Thanks for pointing us to SchemaStore!

An overview of these schemas is available on https://spec.openapis.org/

@handrews
Copy link
Member

@leandrodamascena and others who might be reading, to explain why this happened:

We're working to make it more clear that the files on main are not intended for use, only the published files with URIs documented in id/$id. The JSON files on main were removed because they were intentionally out of sync because of a policy of only updating the YAML files directly. This was very confusing, so we got rid of the misleading files, meaning that the only place you can find the JSON documents is the official place.

The YAML documents and README are being further updated in other open PRs right now.

@leandrodamascena
Copy link
Author

Hi @handrews and @ralfhandl, thanks for clarifying this! I was able to get it working using the new URLs extracted from the base document, thanks.

Closing this issue.

@ralfhandl
Copy link
Contributor

PR for Schema Store has been merged:

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