'Can I use variables in OpenAPI securitySchema? [duplicate]

This is what I want to do:

  "components": {
    "securitySchemes": {
      "azure_auth": {
        "type": "oauth2",
        "description": "Azure Active Directory OAuth2 Flow.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://login.windows.net/{tenant}/oauth2/token",
            "scopes": {}
          }
        },
        "variables": {
            "tenant":"tenantId"
         }
      }
    }
  },

I understand that there is no place for variables in the securitySchemes but was wondering if anyone knew a similar solution. If not, I was considering editing the servers property in my spec, something similar to this



Solution 1:[1]

Darn, unfortunately this looks like an issue that is posted on the OpenAPI github repo.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 pythonNovice