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

Provide JSON Schema draft 7 file as part of schemas #120

Closed
smoya opened this issue Nov 2, 2021 · 6 comments · Fixed by #128 or #184
Closed

Provide JSON Schema draft 7 file as part of schemas #120

smoya opened this issue Nov 2, 2021 · 6 comments · Fixed by #128 or #184
Labels
enhancement New feature or request released

Comments

@smoya
Copy link
Member

smoya commented Nov 2, 2021

Reason/Context

JSON Schema Draft 7 is the JSON Schema version AsyncAPI is compatible with.
All our schemas are written with such dialect, ergo we specify it through the $schema field.
We also make references to that same schema when referencing through $ref.

As you can notice, we strongly depend on such JSON Schema schema.
I'm suggesting we include it as part of our schemas collection so any tool can directly load all schemas, including the JSON Schema Draft 7 on their Schema registries so they don't need to fetch it externally.

A recent real use case can be found asyncapi/studio#159, where the JSON Schema Draft 7 should be provided to Monaco editor YAML plugin in order to avoid fetching it through a HTTP Request.

The plan will also include one JSON Schema schema file per version we require, meaning if we ever adopt a newer JSON Schema draft, we will include it as well here.

Description

Add a new file into /schemas called json-schema-draft-07.json with the exact content of http://json-schema.org/draft-07/schema.

@jonaslagoni
Copy link
Member

I guess we can close this down as part of #128 it is included, right?

@smoya
Copy link
Member Author

smoya commented Feb 10, 2022

I guess we can close this down as part of #128 it is included, right?

Yes I think so (by reading the PR body). However, I can't find the JSON Schema drafts as files in that PR (it is hard to see). Are they included?

@jonaslagoni
Copy link
Member

Because they are a remote reference they are bundled automatically in the bundled schema https://github.com/jonaslagoni/spec-json-schemas/blob/dd457977ac91599ad6833599f2ea6dc4c92b5a13/schemas/2.3.0.json#L482

@smoya
Copy link
Member Author

smoya commented Feb 11, 2022

Because they are a remote reference they are bundled automatically in the bundled schema https://github.com/jonaslagoni/spec-json-schemas/blob/dd457977ac91599ad6833599f2ea6dc4c92b5a13/schemas/2.3.0.json#L482

Oh I see now! Yeah, then this is gonna be closed by #128.
Not sure if you want to close this one or rather add a "Fixes #120" statement on your PR (I think it's better).

@jonaslagoni
Copy link
Member

Not sure if you want to close this one or rather add a "Fixes #120" statement on your PR (I think it's better).

Already there 😄

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
3 participants