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

How do we define expected schemaFormat behavior in tooling? #656

Closed
jonaslagoni opened this issue Nov 22, 2021 · 8 comments
Closed

How do we define expected schemaFormat behavior in tooling? #656

jonaslagoni opened this issue Nov 22, 2021 · 8 comments
Labels
🤷‍♀️ Ambiguity An issue/PR which identifies or fixes spec ambiguity stale

Comments

@jonaslagoni
Copy link
Sponsor Member

This issue is triggered by discussion in: #622

How can we define a standard behavior (should we even define it?), to a degree that tooling can understand and implement "expected" behavior?

I.e. if you are a maintainer on a parser, what do you do if you encounter a JSON Schema and a Raml schema that the message can follow? Especially if we talk about a mix such as what @GeraldLoeffler highlights in #622 (comment).

In our JS Parser we handle such different formats, by converting all of them to JSON Schema. However, this is highly up to interpretation as to how to achieve this.

There are no standard conventions, tooling can follow to ensure that users of the spec get the "expected" output.

Related issues

@jonaslagoni jonaslagoni added the 🤷‍♀️ Ambiguity An issue/PR which identifies or fixes spec ambiguity label Nov 22, 2021
@jonaslagoni jonaslagoni changed the title How do we define proper formatSchema behavior in tooling? How do we define expected formatSchema behavior in tooling? Nov 22, 2021
@jonaslagoni
Copy link
Sponsor Member Author

Maybe this is something for https://github.com/asyncapi/parser-api to define? 🤔

@magicmatatjahu
Copy link
Member

magicmatatjahu commented Nov 22, 2021

To be more specific, do you mean the conventions of how Avro/RAML/etc should be converted to JSON Schema, yes?

@jonaslagoni
Copy link
Sponsor Member Author

To be more specific, do you mean the conventions of how Avro/RAML/etc should be converted to JSON Schema, yes?

Not necessarily to JSON Schema, but how should tooling handle such logic in general. Should it even be converted to JSON Schema, or should it be something different?

This is especially needed when parsers in multiple languages are needed to ensure consistency between them.

@magicmatatjahu
Copy link
Member

Ok, I understand, thanks! Atm ParserJS exactly converts the custom schemas to the AsyncAPI Schema Object (which is superset od JSON Schema, but it's not the same), so maybe we should go with that solution also in other implementations for another languages. However, in order to be consistent, we should have instructions on how to convert a given custom schema into an AsyncAPI Schema Object, i.e. what representation of the Raml, Avro etc keywords should be in the Schema Object - and this is where the parser-api repo would come in handy. Thanks for noticing the problem!

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@jonaslagoni
Copy link
Sponsor Member Author

Still relevant

@jonaslagoni jonaslagoni changed the title How do we define expected formatSchema behavior in tooling? How do we define expected schemaFormat behavior in tooling? Aug 8, 2022
@magicmatatjahu
Copy link
Member

@derberg Could you reopen it?

@derberg derberg reopened this Aug 22, 2022
@github-actions github-actions bot removed the stale label Aug 23, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Dec 22, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤷‍♀️ Ambiguity An issue/PR which identifies or fixes spec ambiguity stale
Projects
None yet
Development

No branches or pull requests

3 participants