What I would like to do is specify two types of response objects, and return them based on query parameter of the request. I don't want to use different API endpoints, because both of these responses are querying the same source of data.
My question is: how do I define API responses that change based on query parameters in the Swagger editor (or in an openAPI spec generally?)
Alternatively, this may be an XY question. Should I just write 2 separate API endpoints to handle this?