Contributions
Default custom header in Swagger UI
We need to be able to determine (on the server side) whether the API call came from our swagger UI or from direct API call/elsewhere. I think ideal for this would be hidden (or not too hidden, if this is not possible) custom header which would be added to API call by default when executed through swagger UI. How could I do this? Thank you, LK419Views0likes0CommentsSwagger: default some object items as not specified/missing
In swagger I define JSON (i.e. object) as input request body for API. Some JSON items are mandatory, others are not, and some of those I want to default (or show example as) to not be specified in the default JSON at all. How can I achieve this? InputJSON: type: object required: - item1 properties: item1: type: string item2: type: string item3: type: array items: type: string Code above shows example as: { "item1": "string", "item2": "string", "item3": [ "string" ] } But I want it to be: { "item1": "string" } Thank you.Solved1KViews0likes1Comment