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

feat: adapt websockets bindings to v3 #207

Closed

Conversation

jonaslagoni
Copy link
Member

@jonaslagoni jonaslagoni commented Jun 13, 2023

Description
This PR adapts the websockets bindings to v3. This first round of review is just for the general structure changes.

TODO right before final review:

  • Adapt examples, if any that contain v2 structure.
  • Figure out which version change this constitutes

TODO after merge:

  • Adapt schema files in spec-schema-repo

Related issue(s)
Related to #182

@jonaslagoni jonaslagoni changed the base branch from master to next-major-spec June 22, 2023 10:23
@jonaslagoni jonaslagoni changed the title feat!: adapt websockets bindings to v3 feat: adapt websockets bindings to v3 Jun 22, 2023
Copy link
Member

@fmvilas fmvilas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still concerned about the usage of parameters for headers but left other suggestions too.

Comment on lines +28 to +29
<a name="operationBindingObjectQuery"></a>`query` | [Parameters Object][parametersObject] | A Schema object containing the definitions for each query parameter.
<a name="operationBindingObjectHeaders"></a>`headers` | [Parameters Object][parametersObject] | A Schema object containing the definitions of the HTTP headers to use when establishing the connection.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<a name="operationBindingObjectQuery"></a>`query` | [Parameters Object][parametersObject] | A Schema object containing the definitions for each query parameter.
<a name="operationBindingObjectHeaders"></a>`headers` | [Parameters Object][parametersObject] | A Schema object containing the definitions of the HTTP headers to use when establishing the connection.
<a name="operationBindingObjectQuery"></a>`query` | [Parameters Object][parametersObject] | A Parameters object containing the definitions for each query parameter.
<a name="operationBindingObjectHeaders"></a>`headers` | [Parameters Object][parametersObject] | A Parameters object containing the definitions of the HTTP headers to use when establishing the connection.

Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no need to release new version of the binding. The fact that we changed schema for parameters, do not mean we should change it for query params and headers. Even in the main spec we still allow schema object for headers.

Parameters from spec are simplified as they are focused on the content of AsyncAPI document. They are used to parametrise and describe dynamic parts of channel name. In case of query params, this is something that describes run time behaviour of the server, so it makes sense to for example specify type: boolean for the sake of better code generation -> https://github.com/asyncapi/spec/blob/master/examples/websocket-gemini.yml#L63-L96

@jonaslagoni
Copy link
Member Author

Alright, that makes sense 👍

@jonaslagoni jonaslagoni deleted the v3_websockets branch June 26, 2023 19:24
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

Successfully merging this pull request may close these issues.

3 participants