OpenAPI-Specification icon indicating copy to clipboard operation
OpenAPI-Specification copied to clipboard

Auth URL Variables

Open michaelmerrill opened this issue 5 years ago • 2 comments

Currently we can set the server variables for different environments like so:

servers:
  - url: 'https://{environment}.example.com/v1'
    variables:
      environment:
        default: api
        enum:
          - api
          - sandbox.api
          - development.api
          - staging.api

Is it possible to also set variables for the authorization code urls? Normally you'd want to match these environments when authenticating. I'd imagine it would look something like this:

securitySchemes:
  OAuth2:
    type: oauth2
    flows:
      authorizationCode:
        authorizationUrl: 
          - url: 'https://{environment}.example.com/authorize'
            variables:
              environment:
                default: accounts
                enum:
                  - accounts
                  - sandbox.accounts
                  - development.accounts
                  - staging.accounts
        tokenUrl: 
          - url: 'https://{environment}.example.com/token'
            variables:
              environment:
                default: accounts
                enum:
                  - accounts
                  - sandbox.accounts
                  - development.accounts
                  - staging.accounts

michaelmerrill avatar Aug 20 '20 21:08 michaelmerrill

Related (or duplicate): OAI/OpenAPI-Specification#551

hkosova avatar Aug 21 '20 08:08 hkosova

Thanks @hkosova , also OAI/Overlay-Specification#33

MikeRalphson avatar Aug 21 '20 09:08 MikeRalphson