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

Properly model Bindings in AsyncAPI #569

Open
Yuutakasan opened this issue Feb 17, 2023 · 2 comments
Open

Properly model Bindings in AsyncAPI #569

Yuutakasan opened this issue Feb 17, 2023 · 2 comments
Labels
enhancement New feature or request priority/high

Comments

@Yuutakasan
Copy link

Yuutakasan commented Feb 17, 2023

For example, in the case of Kafka's Server Binding

servers:
  production:
    bindings:
      kafka:
        schemaRegistryUrl: 'https://my-schema-registry.com'
        schemaRegistryVendor: 'confluent'
        bindingVersion: '0.4.0'

but currently there is only one Binding type and it is defined as follows

  • name: Binding
    traits:
    • Extensible
      properties:
    • name: '*'
      type: any
      propertyOrder:
    • $this
    • $Extensible

No restrictions.

I would like to add individual restrictions, but is there a naming convention here?

A sample is provided below.
I would like to make a sample if this is acceptable.

KafkaServersBinding
KafkaChannelBinding
KafkaChannelTopicConfigurationBinding
KafkaOperationBinding
KafkaMessageBinding
https://github.com/asyncapi/bindings/tree/master/kafka

@EricWittmann
Copy link
Member

Yes bindings do need a bit more work (modeling), for sure. I think the naming convention should be driven by the text of the AsyncAPI specification. For example, the spec has a table of Operation Bindings like this:

image

So I think the convention should be to remove non-alphanumeric characters from the value in the Type column of that table. So in this case, it would be:

  • HTTPOperationBinding
  • WebSocketsOperationBinding
  • KafkaOperationBinding
  • AnypointMQOperationBinding
  • AMQPOperationBinding
  • AMQP10OperationBinding

And so forth.

I believe this is consistent with your suggestion, so I agree. :)

@EricWittmann EricWittmann added enhancement New feature or request priority/high labels Feb 22, 2023
@EricWittmann EricWittmann changed the title I would like to determine a naming convention for restricting Binding type. Properly model Bindings in AsyncAPI Feb 22, 2023
@Yuutakasan
Copy link
Author

@EricWittmann
Sorry for the delay. I will try to work with our team on the Binding extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority/high
Projects
None yet
Development

No branches or pull requests

2 participants