mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-04 12:20:19 +03:00
fix: restore old variant security injections
This commit is contained in:
parent
9920991080
commit
d96f2a0d92
|
@ -38,7 +38,7 @@ info:
|
||||||
OAuth2 - an open protocol to allow secure authorization in a simple
|
OAuth2 - an open protocol to allow secure authorization in a simple
|
||||||
and standard method from web, mobile and desktop applications.
|
and standard method from web, mobile and desktop applications.
|
||||||
|
|
||||||
<SecurityDefinitions />
|
<!-- ReDoc-Inject: <security-definitions> -->
|
||||||
|
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
title: Swagger Petstore
|
title: Swagger Petstore
|
||||||
|
|
|
@ -12,7 +12,11 @@ import { SearchStore } from './SearchStore';
|
||||||
|
|
||||||
import { SchemaDefinition } from '../components/SchemaDefinition/SchemaDefinition';
|
import { SchemaDefinition } from '../components/SchemaDefinition/SchemaDefinition';
|
||||||
import { SecurityDefs } from '../components/SecuritySchemes/SecuritySchemes';
|
import { SecurityDefs } from '../components/SecuritySchemes/SecuritySchemes';
|
||||||
import { SCHEMA_DEFINITION_JSX_NAME, SECURITY_DEFINITIONS_JSX_NAME } from '../utils/openapi';
|
import {
|
||||||
|
SCHEMA_DEFINITION_JSX_NAME,
|
||||||
|
SECURITY_DEFINITIONS_JSX_NAME,
|
||||||
|
OLD_SECURITY_DEFINITIONS_JSX_NAME,
|
||||||
|
} from '../utils/openapi';
|
||||||
|
|
||||||
import { IS_BROWSER } from '../utils';
|
import { IS_BROWSER } from '../utils';
|
||||||
|
|
||||||
|
@ -160,6 +164,12 @@ const DEFAULT_OPTIONS: RedocRawOptions = {
|
||||||
securitySchemes: store.spec.securitySchemes,
|
securitySchemes: store.spec.securitySchemes,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
[OLD_SECURITY_DEFINITIONS_JSX_NAME]: {
|
||||||
|
component: SecurityDefs,
|
||||||
|
propsSelector: (store: AppStore) => ({
|
||||||
|
securitySchemes: store.spec.securitySchemes,
|
||||||
|
}),
|
||||||
|
},
|
||||||
[SCHEMA_DEFINITION_JSX_NAME]: {
|
[SCHEMA_DEFINITION_JSX_NAME]: {
|
||||||
component: SchemaDefinition,
|
component: SchemaDefinition,
|
||||||
propsSelector: (store: AppStore) => ({
|
propsSelector: (store: AppStore) => ({
|
||||||
|
|
|
@ -513,7 +513,7 @@ Petstore offers two forms of authentication:
|
||||||
OAuth2 - an open protocol to allow secure authorization in a simple
|
OAuth2 - an open protocol to allow secure authorization in a simple
|
||||||
and standard method from web, mobile and desktop applications.
|
and standard method from web, mobile and desktop applications.
|
||||||
|
|
||||||
<SecurityDefinitions />
|
<!-- ReDoc-Inject: <security-definitions> -->
|
||||||
",
|
",
|
||||||
"license": Object {
|
"license": Object {
|
||||||
"name": "Apache 2.0",
|
"name": "Apache 2.0",
|
||||||
|
|
|
@ -627,6 +627,7 @@ export function normalizeServers(
|
||||||
}
|
}
|
||||||
|
|
||||||
export const SECURITY_DEFINITIONS_JSX_NAME = 'SecurityDefinitions';
|
export const SECURITY_DEFINITIONS_JSX_NAME = 'SecurityDefinitions';
|
||||||
|
export const OLD_SECURITY_DEFINITIONS_JSX_NAME = 'security-definitions';
|
||||||
export const SCHEMA_DEFINITION_JSX_NAME = 'SchemaDefinition';
|
export const SCHEMA_DEFINITION_JSX_NAME = 'SchemaDefinition';
|
||||||
|
|
||||||
export let SECURITY_SCHEMES_SECTION_PREFIX = 'section/Authentication/';
|
export let SECURITY_SCHEMES_SECTION_PREFIX = 'section/Authentication/';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user