Reputation: 15
I have an API documented in swagger and i want to have some kind of toggle to make a certain part of the description internal.
parameter:
- name: abc
description: |
line1
line2
line3
in the above example, is it possible to introduce some kind of togggle so that the line3 does not get shown in the final document. I am using openapi-filter.js to mark the objects and attributes as x-internal but i have no idea how to do it to toggle a part of description.
Upvotes: 0
Views: 639
Reputation: 1986
There isn't a feature in OpenAPI (and wasn't in Swagger as far as I know) to hide part of a description as you describe. I recommend using your own x-internal-info
field or something that you can parse for the appropriate audience. Sorry this isn't the answer you were hoping for!
Upvotes: 1