diff --git a/src/components/SecuritySchemes/SecuritySchemes.tsx b/src/components/SecuritySchemes/SecuritySchemes.tsx index f23264bd..817b0666 100644 --- a/src/components/SecuritySchemes/SecuritySchemes.tsx +++ b/src/components/SecuritySchemes/SecuritySchemes.tsx @@ -23,6 +23,7 @@ export interface OAuthFlowProps { export class OAuthFlow extends React.PureComponent { render() { const { type, flow } = this.props; + const scopesNames = Object.keys(flow?.scopes || {}); return ( {type} OAuth Flow @@ -45,16 +46,21 @@ export class OAuthFlow extends React.PureComponent { {flow!.refreshUrl} )} -
- Scopes: -
- + {!!scopesNames.length && ( + <> +
+ Scopes: +
+ + + )} );