diff --git a/src/components/SecurityDefs/SecurityDefs.tsx b/src/components/SecurityDefs/SecurityDefs.tsx index 4302ca99..4146d3b3 100644 --- a/src/components/SecurityDefs/SecurityDefs.tsx +++ b/src/components/SecurityDefs/SecurityDefs.tsx @@ -10,7 +10,7 @@ import { OpenAPISecurityScheme } from '../../types'; const AUTH_TYPES = { oauth2: 'OAuth2', apiKey: 'API Key', - basic: 'Basic Authorization', + http: 'HTTP', openIdConnect: 'Open ID Connect', }; @@ -23,6 +23,10 @@ const AuthTable = styled.table` ul > li { margin: 0.5em 0 !important; } + + th { + text-transform: capitalize; + } `; export class OAuthFlow extends React.PureComponent { @@ -84,7 +88,7 @@ export class SecurityDefs extends React.PureComponent { Security scheme type: - {AUTH_TYPES[scheme.type]} + {AUTH_TYPES[scheme.type] || scheme.type} {scheme.apiKey ? ( @@ -93,14 +97,17 @@ export class SecurityDefs extends React.PureComponent { ) : scheme.http ? ( [ - + HTTP Authorization Scheme - {scheme.http.scheme} - , - - Bearer format - "{scheme.http.bearerFormat}" + {scheme.http.scheme} , + scheme.http.scheme === 'bearer' && + scheme.http.bearerFormat && ( + + Bearer format + "{scheme.http.bearerFormat}" + + ), ] ) : scheme.openId ? (