Open
Description
Q&A
- OS: macOS
- Browser: chrome
- Version: 86.0.4240.80
- Method of installation: dist assets
- Swagger-UI version: 3.35.2
- Swagger/OpenAPI version: OpenAPI 3.0
Content & configuration
Swagger-UI configuration options:
window.ui = SwaggerUIBundle({
urls: specsUrls,
dom_id: '#swagger-ui',
filter: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: 'StandaloneLayout',
validatorUrl: null,
oauth2RedirectUrl: defaultRedirectUrl
});
I use two specifications on two different urls:
Account:
{
"openapi": "3.0.1",
"info": {
"title": "Account",
"version": "1.0"
},
"servers": [
{
"url": "/api"
}
],
"paths": {
"/accounts/v1/me": {
"get": {
...,
"security": [
{
"Oauth2Application": [
"read:me"
]
},
{
"Oauth2AuthorizationCode": [
"read:me"
]
}
]
}
}
},
"components": {
"schemas": {
...
},
"securitySchemes": {
"Oauth2Application": {
"type": "oauth2",
"flows": {
"clientCredentials": {
"tokenUrl": "XXX",
"scopes": {
"read:me": "Self account read",
"write:me": "Self account write"
}
}
}
},
"Oauth2AuthorizationCode": {
"type": "oauth2",
"flows": {
"authorizationCode": {
"authorizationUrl": "XXX",
"tokenUrl": "XXX",
"scopes": {
"read:me": "Self account read",
"write:me": "Self account write"
}
}
}
}
}
}
}
And Assets:
{
"openapi": "3.0.1",
"info": {
"title": "Assets",
"version": "1.0"
},
"servers": [
{
"url": "/api/assets/v1"
}
],
"paths": {
"/assets": {
"get": {
...,
"security": [
{
"Oauth2Application": [
"read:assets"
]
},
{
"Oauth2AuthorizationCode": [
"read:assets"
]
}
]
}
}
},
"components": {
"schemas": {
...
},
"securitySchemes": {
"Oauth2Application": {
"type": "oauth2",
"flows": {
"clientCredentials": {
"tokenUrl": "XXX",
"scopes": {
"read:assets": "Read your assets",
"write:assets": "Create and update your assets"
}
}
}
},
"Oauth2AuthorizationCode": {
"type": "oauth2",
"flows": {
"authorizationCode": {
"authorizationUrl": "XXX",
"tokenUrl": "XXX",
"scopes": {
"read:assets": "Read your assets",
"write:assets": "Create and update your assets"
}
}
}
}
}
}
}
Description
Hello !
I have one problem on scopes on oauth2 modal when I use the topbar component: it seems the scopes are not reloaded on url change.
To reproduce...
Steps to reproduce the behavior:
- Go to default definition ("Account")
- Click on Authorize button
- See "Account" scopes "read:me" and "write:me"
- Close modal
- Change definition to "Assets"
- Click on Authorize button
- See "Account" scopes "read:me" and "write:me" instead of "Assets" scopes "read:assets" and "write:assets"
Expected behavior
On step 7, I wan't to see the "Assets" scopes.