How to describe different responses in OpenAPI for authenticated and non-auth requests?

Viewed 57

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.

0 Answers
Related