Skip to content

Commit

Permalink
Use name instead of keyParamName for lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
jirikuncar committed Jan 15, 2020
1 parent 639824f commit 5d0184d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func (r api{{operationId}}Request) Execute() ({{#returnType}}{{{.}}}, {{/returnT
if r.ctx != nil {
// API Key Authentication
if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok {
if auth, ok := auth["{{#vendorExtensions.x-lookup}}{{.}}{{/vendorExtensions.x-lookup}}{{^vendorExtensions.x-lookup}}{{keyParamName}}{{/vendorExtensions.x-lookup}}"]; ok {
if auth, ok := auth["{{#vendorExtensions.x-lookup}}{{.}}{{/vendorExtensions.x-lookup}}{{^vendorExtensions.x-lookup}}{{name}}{{/vendorExtensions.x-lookup}}"]; ok {
var key string
if auth.Prefix != "" {
key = auth.Prefix + " " + auth.Key
Expand Down
Loading

0 comments on commit 5d0184d

Please sign in to comment.