asyncapi / bindings

AsyncAPI bindings specifications
Apache License 2.0
71 stars 75 forks source link

How to define response code for HTTP #234

Closed jonaslagoni closed 8 months ago

jonaslagoni commented 8 months ago

Reason/Context

Right now there are no way to define response codes for a message/operation for HTTP.

Right now I am doing it like this for messages:

...
      HttpCustomersGetMessageResponse:
        description: OK
        payload:
          $ref: '#/components/schemas/CustomerPaginated'
        bindings:
          http:
            x-response-code: 200

However, I think this should be part of the official bindings in some way or form