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

[2.0.0 REVIEW] Use JSON Schema Draft 07 as the default schema #212

Closed
fmvilas opened this issue May 1, 2019 · 5 comments · Fixed by #256
Closed

[2.0.0 REVIEW] Use JSON Schema Draft 07 as the default schema #212

fmvilas opened this issue May 1, 2019 · 5 comments · Fixed by #256
Assignees
Labels

Comments

@fmvilas
Copy link
Member

fmvilas commented May 1, 2019

After playing a lot these days with AsyncAPI 2.0.0-rc1, I realized most of the pain comes from having the OpenAPI schema as the default. We want to keep supporting OpenAPI schemas but there's no need to make it the default choice.

There's only one thing that worries me and it's the lack of a deprecation property in Draft 07. However, @philsturgeon is working on it and will probably make it for Draft 08. As per discriminator and externalDocs, they can just be extensions in the form of x-discriminator and x-external-docs. Same for deprecated in the meantime, it can be done using x-deprecated.

@handrews do you have a list of changes (or potential changes) for Draft 08? I've seen this but I'd like to know if upgrading the AsyncAPI default schema from Draft 07 to Draft 08 will be a breaking change. Or put it another way, are there breaking changes in Draft 08 compared to Draft 07?

@philsturgeon
Copy link

deprecated got merged (albeit a bit hastily) into draft 08 so you're all set.

@fmvilas
Copy link
Member Author

fmvilas commented May 20, 2019

Awesome!! 🎉 And congrats for your first contribution on JSON Schema, Phil.

@fmvilas fmvilas self-assigned this Jul 10, 2019
@fmvilas
Copy link
Member Author

fmvilas commented Aug 8, 2019

@philsturgeon I'm going to (almost) follow your suggestion here: OAI/OpenAPI-Specification#1977.

However, and since tooling is not yet ready for Draft-08, AsyncAPI is going to adopt a superset of Draft-07 as the default schema, and the parser will provide a "translator" from current OpenAPI schemas.

Thanks for the work you did there. It helped clarify the current scenario.

@philsturgeon
Copy link

giphy-downsized-large

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

3 participants