Skip to content

Generate empty scopes object #893

Closed
Closed
@bks71

Description

@bks71

Is your feature request related to a problem? Please describe.

  • A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
  • What is the actual result using OpenAPI Description (yml or json)?
    I've defined an oauth2 security scheme with no scopes. The generated OAS doc does not contain a scopes object - but according to https://swagger.io/docs/specification/authentication/oauth2/, an empty scopes object should be defined (See the "No Scopes" section on that page.) This has never been an issue before, but I am using a tool that doesn't like that.

Describe the solution you'd like

  • A clear and concise description of what you want to happen.
  • What is the expected result using OpenAPI Description (yml or json)?
    For a no-scope security scheme, define an empty scopes object, e.g.
    components: securitySchemes: oAuthNoScopes: type: oauth2 flows: implicit: authorizationUrl: https://api.example.com/oauth2/authorize scopes: {}

Describe alternatives you've considered

  • A clear and concise description of any alternative solutions or features you've considered.
    I tried to force this using an empty OAuthScope object, but that did not work.

Additional context

  • Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions