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