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

Introduce data format bindings #694

Closed
jessemenning opened this issue Jan 20, 2022 · 4 comments
Closed

Introduce data format bindings #694

jessemenning opened this issue Jan 20, 2022 · 4 comments
Labels
stale 💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md)

Comments

@jessemenning
Copy link

Background
In contrast to Async communications utilize many different protocols, such as JMS, WebSockets, NATS, etc. But the payload format can be formatted in many different ways as well.

Issue
Similar to protocols, each of these payloads can include different options that are unique to the payload. For instance:

  • an XML schema foo.xsd includes multiple root elements. When using foo.xsd to define a message payload format, the developer/code generator needs to be told which root element is being used.
  • Protobuf namespaces.
  • Others?

While each of these can be specified within the core spec itself, if AsyncAPI includes optional parameters for every potential payload, it will likely be a long list that will not be easily adaptable to the next popular data format.
Proposed Resolution
Similar to protocols, introduce the concept of a payload binding to hold these payload-specific configuration.

@jessemenning jessemenning added the 💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md) label Jan 20, 2022
@magicmatatjahu
Copy link
Member

magicmatatjahu commented Jan 20, 2022

@jessemenning Thanks for that issue! Maybe we should extend this idea (#622) with adding extra fields to the options next to schema and schemaFormat? The schemaFormat in this case would be the binding name for the format.

Example:

payload:
  schemaFormat: ...xml
  schema: ...xml data
  schemaOptions:
    rootObject: ...
    ... other options

Note that this syntax can be used anywhere in the specification where we can define Schema Object, not just in the message's payload.

Of course we can treat some options as default for every schemaFormat, like ref or resolve:

schemaOptions will be passed to the given parser for given format.

The difference between protocol bindings and format bindings (schema formats) is that the first are described from the point of view of the app (how server/operation works underneath) and the second from the point of view of the tool, i.e. the custom parser for given format and I think someone might have a problem with that.

What are your thoughts on this?

@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
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 stale and removed stale labels Sep 21, 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 Jan 21, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale 💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md)
Projects
None yet
Development

No branches or pull requests

3 participants