Skip to content

[go] Bug: Invalid generated code for client when apiKey in cookie is used. #1600

@dmascialino

Description

@dmascialino
Description

The client code generated for go, when cookie option is used for apiKey (as described here: https://swagger.io/docs/specification/authentication/api-keys/ ) is broken.

openapi-generator version

3.3.4-SNAPSHOT (commit: 33016f2 )

OpenAPI declaration file content or url

https://gist.github.com/dmascialino/016fd42979b4736658d91a303404dba9

Command line used for generation

openapi-generator generate -i api_defenition.yaml -g go -o openapi

Steps to reproduce
go build ./openapi
# openapi_example/openapi
openapi/api_default.go:67:8: key declared and not used

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions