I am stuck on something stupid : I want to display the documentation for each route with swagger only if I give a correct api-key. How can I achieve that? Where can I configure the headers when I try to load the UI?
I tried that :
$('#input_apiKey').change(function() {
var key = $('#input_apiKey')[0].value;
if(key && key.trim() != "") {
swaggerUi.api.clientAuthorizations.add("key", new SwaggerClient.ApiKeyAuthorization("api_key", key, "header"));
}
})
But it doesn't appear in the request headers.