Uh oh!
There was an error while loading. Please reload this page.
[Golang] Support multiple APIKeys - #3210
Conversation
wing328
commented
Jun 25, 2019
@nmuesch thanks for the PR. I wonder if you can update the Go (XML) petstore sample: Script: |
| ContextAPIKey = contextKey("apikey") | ||
| {{#authMethods}} | ||
| {{#isApiKey}} | ||
| Context{{name}} = contextKey("{{name}}") |
There was a problem hiding this comment.
Seems like this line is not indented correctly (1 additional tab)
There was a problem hiding this comment.
And what about making ContextAPIKey a map instead as that's what we do in other languages?
wing328
commented
Jun 25, 2019
Also the current implementation will result in compilation errors if the security name contains space or dash (e.g. "api key", "api-key") |
nmuesch
commented
Jul 2, 2019
Thanks for the input and review! I plan on getting back to this shortly and will give it another iteration. |
wing328
commented
Jul 4, 2019
@nmuesch just ping me via https://gitter.im if you need any help. |
wing328
commented
Jul 6, 2019
Please submit the change (breaking) against Closing this one for the time being. |
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh,./bin/openapi3/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.master,4.1.x,5.0.x. Default:master.Description of the PR
This PR aims to address #797 by adding multiple values to the Context attribute passed to authentication. This allows us to use a unique key to reference the Context with to retrieve any number of values for
ApiKey