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

Implement new simplified channel parameters #815

Closed
Tracked by #809
smoya opened this issue Jul 25, 2023 · 1 comment
Closed
Tracked by #809

Implement new simplified channel parameters #815

smoya opened this issue Jul 25, 2023 · 1 comment

Comments

@smoya
Copy link
Member

smoya commented Jul 25, 2023

Apply the changes introduced by asyncapi/spec#935

Regarding the changes in Parser-JS, we don’t really need to do a lot because we can keep the current API -> schema(): Schema | undefined
However, things like parameter.schema().example() will now require to return the value from the parameter.example() which is basically the parent level.

In that way, we don’t need to add a breaking change in the parser-api. Internally, we can create a new object called simplifiedSchema or similar, that inherits the behaviour from the Schema object, but only “allowing” the enum, default, and examples methods, logging a warning message when using the others.

Remember that including any non-supported field in the parameter will make any ASyncAPI v3 document to become invalid, so it is not expected developers call any other method from the schema (but still, logging a warning message its a good idea)

@smoya smoya changed the title Parser-JS: Implement new simplified channel parameters Implement new simplified channel parameters Jul 25, 2023
@smoya smoya changed the title Implement new simplified channel parameters Implement new simplified channel parameters JSON Schema required changes Jul 25, 2023
@smoya smoya changed the title Implement new simplified channel parameters JSON Schema required changes Implement new simplified channel parameters Jul 25, 2023
@jonaslagoni
Copy link
Member

Pretty sure this is done 😄

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

No branches or pull requests

2 participants