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

drop asyncapi json schemas prior 2.0 and release 4.0 #238

Closed
derberg opened this issue Jul 7, 2022 · 8 comments · Fixed by #248
Closed

drop asyncapi json schemas prior 2.0 and release 4.0 #238

derberg opened this issue Jul 7, 2022 · 8 comments · Fixed by #248
Labels
enhancement New feature or request released

Comments

@derberg
Copy link
Member

derberg commented Jul 7, 2022

we still expose AsyncAPI 1.0, 1.1 and 1.2 but we do not really support it anymore.

we should remove it and release new major

these old schemas use draft 4 as base. The new ones use draft 7. So in parser we are forced to point to draft 4 as meta schema for ajv. So we do something in the parser that do not make much sense, as parser do not support asyncapi prior 2.0

thoughts?

cc approvers @fmvilas @dalelane

@derberg derberg added the enhancement New feature or request label Jul 7, 2022
@magicmatatjahu
Copy link
Member

The plus is that then the final bundle will be reduced, e.g. for parser, because the all schemas alone take up about 300kb.

@smoya
Copy link
Member

smoya commented Sep 19, 2022

+1 this but I would keep the schemas and rather remove them from the list of schemas the Parser uses. See #248.

Why should we still serve those files? Simple: users can still want to use those schemas on their own, without the support of the tooling or the community.

@derberg
Copy link
Member Author

derberg commented Sep 26, 2022

@smoya just to make sure, you are ok to remove it from the package, but want to keep it in the repo?

@smoya
Copy link
Member

smoya commented Sep 26, 2022

@smoya just to make sure, you are ok to remove it from the package, but want to keep it in the repo?

Not exactly. I meant to still include those in the package but remove it from the exported list. Still the package won't be reduced in terms of size, but the bundled applications won't contain those ergo will be lighter and still give support for those that need it. We could export unsupportedVersions with those or just apply what @magicmatatjahu is doing in #248 (does the other way around by exporting supportedVersions).

Another solution could be to publish two different packages, @asyncapi/types and @asyncapi/deprecated-types 🤷

@derberg
Copy link
Member Author

derberg commented Sep 27, 2022

Can you explain why should package provide something that is not supported, what is the use case? I think this is what versioning is for. If you want to support 1.0.0 of spec then use the old package version, or just fetch files from github. Keeping unsupported features is not encouraging folks to upgrade, right?

@smoya
Copy link
Member

smoya commented Sep 30, 2022

Can you explain why should package provide something that is not supported, what is the use case? I think this is what versioning is for. If you want to support 1.0.0 of spec then use the old package version, or just fetch files from github. Keeping unsupported features is not encouraging folks to upgrade, right?

I think you are right and we should remove support for all those versions in the package as well. If people wants to keep up with latest tooling versions they would need to upgrade their AsyncAPI documents to at least 2.0.0, which is totally considerable.

I would then only leave the schema files in the repository so they are accessible and downloadable still.

@magicmatatjahu
Copy link
Member

PR for that :) #248

cc @derberg @smoya

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 4.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
Development

Successfully merging a pull request may close this issue.

4 participants