0

I am currently working on my API documentation with AsyncApi. I couldn't find an example of marking a channel as deprecated, does anyone know how to do that? I tried it as follow, but there is no visible sign that the channel is deprecated when accessing the api.

channels:
  queuing.XXX:
    description: >
      ....
    publish:
      message:
        oneOf:
          - name: XXX
            description: >
              ...
            deprecated: true
            payload:
              $ref: '#/components/schemas/XXX'
...
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
philgsk
  • 51
  • 9

2 Answers2

1

In current AsyncAPI Specification (at the time of writing - for version 2.4.0) you can use only deprecated keyword in the Schema Object. If you think that deprecation of Message Object (like in your example) or Channel/Operation Object should be allowed in spec, you can create issue for that https://github.com/asyncapi/spec/issues or even crate proposal for newer versions of spec.

You can check how spec looks like here https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md

matatjahu
  • 116
  • 1
1

There is no way to specify a deprecated channel in AsyncAPI using some special property.

Please join the related discussion in the AsyncAPI spec repository -> https://github.com/asyncapi/spec/issues/305 and share your opinion on proposed solutions

For now, we only heard opinions from people that are related to maintenance of different specifications like AsyncAPI, OpenAPI, and JSON Schema, but not much info from users that need it.

Lukasz Gornicki
  • 609
  • 4
  • 12