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
  • #6184
Closed
Open
Issue created May 06, 2020 by Administrator@rootContributor

[BUG][ALL] HTTP Auth scheme names are (incorrectly) case-sensitive

Created by: asazernik

Description

The API generator does not generate authorization/authentication code when the user inserts a security scheme like so:

components:
  securitySchemes:
    bearerToken:
      type: http
      scheme: Bearer

Note that "Bearer" is title-cased. It works if the scheme is instead lowercase "bearer".

Even though the spec is not clear on the subject, according to the spec author HTTP auth schemes should be case-insensitive. Even if the schemes were case-sensitive, the IANA registry's canonical cases for the two most common schemes are "Bearer" and "Basic".

openapi-generator version

4.3.0

OpenAPI declaration file content or url

See yaml snippet in description above

Command line used for generation

openapi-generator generate -i $OAS3_YAML_FILE -g scala-akka -o /tmp/apiclient-test

I have also tested this with ruby and bash generators

Suggest a fix

I've opened a PR in swagger-api/swagger-js#1531; I don't know where the relevant code is in this project, though.

Assignee
Assign to
Time tracking