Forum Discussion

niwaghan's avatar
New Member
3 years ago

Allowing multiple put payload definitions within one swagger version

Hi all!


I am new to swagger. I want to define an API where the customer's PUT request can be one of two payloads. The payload has two options, depending on one of the internal properties.


Under the "put" definition, I would like to accept one of two definitions of the VirtualNetwork resource.


     "name": "parameters",
     "in": "body",
     "required": true,
     "schema": {
     "$ref": "#/definitions/VirtualNetwork"
     }, ...



Is there a way to do this within one swagger version?

Can I just define the "put" request twice for one path, each pointing to a different definition?

Will I need to use another path? Please let me know if the question needs clarification.



No RepliesBe the first to reply