'How to describe different responses in OpenAPI for authenticated and non-auth requests?
I have REST path GET /items/{itemid} which returns a number of fields. Let's say 'title' and 'description'. Now I want to return some extra fields if request has auth header. E.g. 'myLastVisit' date time field.
How to describe this situation in OpenAPI 3?
Polymorphism and discriminator doesn't help here, because they relate to response, not request conditions.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
