mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 16:46:34 +03:00
refactor: rename SecurityDefs to SecuritySchemes
This commit is contained in:
parent
426e5b67ab
commit
c484411171
|
@ -3,7 +3,7 @@ import { observer } from 'mobx-react';
|
|||
|
||||
import { AppStore } from '../../services/AppStore';
|
||||
|
||||
import { SecurityDefs } from '../SecurityDefs/SecurityDefs';
|
||||
import { SecurityDefs } from '../SecuritySchemes/SecuritySchemes';
|
||||
import { Markdown } from '../Markdown/Markdown';
|
||||
import { MiddlePanel, DarkRightPanel, Row } from '../../common-elements/';
|
||||
|
||||
|
@ -102,7 +102,7 @@ export class ApiInfo extends React.Component<ApiInfoProps> {
|
|||
'security-definitions': {
|
||||
component: SecurityDefs,
|
||||
propsSelector: store => ({
|
||||
securitySchemes: store!.spec.security,
|
||||
securitySchemes: store!.spec.securitySchemes,
|
||||
}),
|
||||
},
|
||||
}}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from 'react';
|
||||
|
||||
import { SecuritySchemesModel } from '../../services/models/';
|
||||
import { SecuritySchemesModel } from '../../services/models';
|
||||
|
||||
import styled from '../../styled-components';
|
||||
import { H2 } from '../../common-elements';
|
||||
|
@ -14,11 +14,6 @@ const AUTH_TYPES = {
|
|||
openIdConnect: 'Open ID Connect',
|
||||
};
|
||||
|
||||
export interface OAuthFlowProps {
|
||||
type: string;
|
||||
flow: OpenAPISecurityScheme['flows'][keyof OpenAPISecurityScheme['flows']];
|
||||
}
|
||||
|
||||
const AuthTable = styled.table`
|
||||
ul > li {
|
||||
margin: 0.5em 0 !important;
|
||||
|
@ -29,6 +24,11 @@ const AuthTable = styled.table`
|
|||
}
|
||||
`;
|
||||
|
||||
export interface OAuthFlowProps {
|
||||
type: string;
|
||||
flow: OpenAPISecurityScheme['flows'][keyof OpenAPISecurityScheme['flows']];
|
||||
}
|
||||
|
||||
export class OAuthFlow extends React.PureComponent<OAuthFlowProps> {
|
||||
render() {
|
||||
const { type, flow } = this.props;
|
|
@ -38,7 +38,7 @@ export class SpecStore {
|
|||
}
|
||||
|
||||
@computed
|
||||
get security() {
|
||||
get securitySchemes() {
|
||||
const schemes = this.parser.spec.components && this.parser.spec.components.securitySchemes;
|
||||
return schemes && new SecuritySchemesModel(this.parser);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user