I need to support two kinds of request-bodies for the same endpoint and same method (POST). Is it possible in Swagger?
This is important because both request-bodies are valid and a user can send either one of them. More specifically,
RequestBody 1:
{ param1: value1 param2: value2 param3: { param3Key1: x1 param3Key2: x2 ... } } RequestBody 2:
{ param1: value1 param2: value2 param4: { differentKey1: y1 differentKey2: y2 ... } } Is there a way to document this situation in Swagger?
One way to do that would be keeping both param3 and param4 in the docs. But, I want the users to specifically know that only one of them needs to be passed. I want to have an altogether different request-body for both of the situations.