Issue
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'
...
Solution
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
Answered By - matatjahu
Answer Checked By - Mary Flores (JavaFixing Volunteer)