Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #208
Closed
Open
Issue created Jun 03, 2018 by Administrator@rootContributor

missing cookie apiKey authentication mechanism

Created by: matteomazza91

Description

Security Scheme Object defines that apiKey can be in "query", "header" or "cookie".
Actually the generator allows only "query" and "header" as shown by the following snippet:

if (SecurityScheme.Type.APIKEY.equals(securityScheme.getType())) {
            cs.isBasic = cs.isOAuth = false;
            cs.isApiKey = true;
            cs.keyParamName = securityScheme.getName();
            cs.isKeyInHeader = securityScheme.getIn() == SecurityScheme.In.HEADER;
            cs.isKeyInQuery = !cs.isKeyInHeader;
} 
Suggest a fix/enhancement

I had already proposed a PR to the swagger-codegen project to solve this issue.
I can start working on it right now.

Assignee
Assign to
Time tracking