I searched many threads, but the only solution I found is to add params to all operations.
In my API, I expect a custom header to be always present. It should be passed in all operations. In the spec it is set like this:
...
"parameters": {
"salesUnitHeader": {
"name": "SALES-UNIT",
"in": "header",
"description": "Sales Unit Header",
"required": true,
"schema": {
"type": "string"
}
}
Actually what I want is that the SwaggerUI user sets the sales unit once and then all endpoints use this parameter. However, the only two options I see are, set it per endpoint, but then the user has to set the header again and again or put the header in the authorization which I actually don’t want.
Isn’t there an option to display form input fields in the header for header params and SwaggerUI will use the data for all endpoints?