Skip to content

Commit cd1885d

Browse files
dmascialinowing328
authored andcommitted
Remove API Key Authentication code for go when cookie is used. (#1601)
1 parent b4c3642 commit cd1885d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/openapi-generator/src/main/resources/go/api.mustache

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
236236
{{/hasBodyParam}}
237237
{{#authMethods}}
238238
{{#isApiKey}}
239+
{{^isKeyInCookie}}
239240
if ctx != nil {
240241
// API Key Authentication
241242
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
@@ -253,7 +254,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
253254
{{/isKeyInQuery}}
254255
}
255256
}
256-
257+
{{/isKeyInCookie}}
257258
{{/isApiKey}}
258259
{{/authMethods}}
259260
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)

0 commit comments

Comments
 (0)