"raw" link doesn't respect api_key
If you input an api_key in the UI, it is not used when clicking the 'raw' link of an item and gives only partial results.
I wasn't sure if it was me or a bug. I've just been dabbling in this area as well. I have my own "key" that I'm trying to inject as a query parameter:
window.authorizations.add("key", new ApiKeyAuthorization("access_token", currentToken, "query"));
But the token wouldn't show up in any of the requests until I added a couple of lines of code. In swagger-client.js I re-applied the authorizations just before executing the requests:
...
//Apply authorizations
var e = (typeof window !== 'undefined' ? window : exports);
e.authorizations.apply(obj);
new SwaggerHttp().execute(obj);
}
Is this a valid issue or am I doing something wrong?
@watnotte - that's actually not related to the topic. What you're looking for is addition authorization to API calls whereas I'm talking about the authorization to the API documentation.
As for your case, it should work with
window.authorizations.add("key", new ApiKeyAuthorization("access_token", currentToken, "query"));
only, but if it doesn't, feel free to open a separate issue on it.
Sorry, misunderstood. I'll open a separate case. Thanks.
since 2.1 doesn't show the link by default, I'm guessing this might not need to be supported.
I believe SwaggerJS should provide the complete link in the model.
The Raw link is gone. We're converting all old specs to 2.0 before rendering