You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a case where we define the API spec for endpoints protected by a customized JWT access token, we would expect the access token to define the scopes that the user can access. Although OpenAPI 3.1 is not officially supported by this project, it should be possible to adopt this feature.
Expected behavior
Both of the following securitySchemes should render the scopes under Authorization.
security:
- petstore_auth:
- "write:pets"
- "read:pets"
- api_key:
- "write:pets"
- "read:pets"securitySchemes:
petstore_auth:
description: | Get access to data while protecting your account credentials. OAuth2 is also a safer and more secure way to give you access.type: oauth2flows:
implicit:
authorizationUrl: "http://petstore.swagger.io/api/oauth/dialog"scopes:
"write:pets": modify pets in your account"read:pets": read your petsapi_key:
description: > For this sample, you can use the api key `special-key` to test the authorization filters.type: apiKeyname: api_keyin: header
The text was updated successfully, but these errors were encountered:
Describe the bug
OpenAPI 3.1.0 allows scopes to be defined for security schemes other than OAuth:
In a case where we define the API spec for endpoints protected by a customized JWT access token, we would expect the access token to define the scopes that the user can access. Although OpenAPI 3.1 is not officially supported by this project, it should be possible to adopt this feature.
Expected behavior
Both of the following securitySchemes should render the
scopes
underAuthorization
.The text was updated successfully, but these errors were encountered: