Skip to content

feat: adapt websockets bindings to v3 - #207

Closed
jonaslagoni wants to merge 3 commits into
asyncapi:next-major-specfrom
jonaslagoni:v3_websockets
Closed

jonaslagoni wants to merge 3 commits into
asyncapi:next-major-specfrom
jonaslagoni:v3_websockets

Conversation

@jonaslagoni

@jonaslagoni jonaslagoni commented Jun 13, 2023 •

Copy link
Copy Markdown
Member

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

@fmvilas fmvilas left a comment

Copy link
Copy Markdown
Contributor

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 thread websockets/README.md
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
Copy Markdown
Contributor

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.

@derberg derberg left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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