mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-23 00:56:33 +03:00
chore: rename ObjectDescription to SchemaDefinition
This commit is contained in:
parent
0504ad4b76
commit
9bf45d810e
|
@ -18,7 +18,7 @@ export interface ObjectDescriptionProps {
|
||||||
options: RedocNormalizedOptions;
|
options: RedocNormalizedOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ObjectDescription extends React.PureComponent<ObjectDescriptionProps> {
|
export class SchemaDefinition extends React.PureComponent<ObjectDescriptionProps> {
|
||||||
private static getMediaType(schemaRef: string, exampleRef?: string): OpenAPIMediaType {
|
private static getMediaType(schemaRef: string, exampleRef?: string): OpenAPIMediaType {
|
||||||
if (!schemaRef) {
|
if (!schemaRef) {
|
||||||
return {};
|
return {};
|
||||||
|
@ -44,7 +44,7 @@ export class ObjectDescription extends React.PureComponent<ObjectDescriptionProp
|
||||||
parser,
|
parser,
|
||||||
'json',
|
'json',
|
||||||
false,
|
false,
|
||||||
ObjectDescription.getMediaType(schemaRef, exampleRef),
|
SchemaDefinition.getMediaType(schemaRef, exampleRef),
|
||||||
options,
|
options,
|
||||||
);
|
);
|
||||||
}
|
}
|
|
@ -10,10 +10,10 @@ import { RedocNormalizedOptions, RedocRawOptions } from './RedocNormalizedOption
|
||||||
import { ScrollService } from './ScrollService';
|
import { ScrollService } from './ScrollService';
|
||||||
import { SearchStore } from './SearchStore';
|
import { SearchStore } from './SearchStore';
|
||||||
|
|
||||||
import { ObjectDescription } from '../components/ObjectDescription/ObjectDescription';
|
import { SchemaDefinition } from '../components/SchemaDefinition/SchemaDefinition';
|
||||||
import { SecurityDefs } from '../components/SecuritySchemes/SecuritySchemes';
|
import { SecurityDefs } from '../components/SecuritySchemes/SecuritySchemes';
|
||||||
import {
|
import {
|
||||||
OBJECT_DEFINTION_JSX_NAME,
|
SCHEMA_DEFINITION_JSX_NAME,
|
||||||
SECURITY_DEFINITIONS_COMPONENT_NAME,
|
SECURITY_DEFINITIONS_COMPONENT_NAME,
|
||||||
SECURITY_DEFINITIONS_JSX_NAME,
|
SECURITY_DEFINITIONS_JSX_NAME,
|
||||||
} from '../utils/openapi';
|
} from '../utils/openapi';
|
||||||
|
@ -162,8 +162,8 @@ const DEFAULT_OPTIONS: RedocRawOptions = {
|
||||||
securitySchemes: store.spec.securitySchemes,
|
securitySchemes: store.spec.securitySchemes,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
[OBJECT_DEFINTION_JSX_NAME]: {
|
[SCHEMA_DEFINITION_JSX_NAME]: {
|
||||||
component: ObjectDescription,
|
component: SchemaDefinition,
|
||||||
propsSelector: (store: AppStore) => ({
|
propsSelector: (store: AppStore) => ({
|
||||||
parser: store.spec.parser,
|
parser: store.spec.parser,
|
||||||
options: store.options,
|
options: store.options,
|
||||||
|
|
|
@ -497,7 +497,7 @@ export function normalizeServers(
|
||||||
|
|
||||||
export const SECURITY_DEFINITIONS_COMPONENT_NAME = 'security-definitions';
|
export const SECURITY_DEFINITIONS_COMPONENT_NAME = 'security-definitions';
|
||||||
export const SECURITY_DEFINITIONS_JSX_NAME = 'SecurityDefinitions';
|
export const SECURITY_DEFINITIONS_JSX_NAME = 'SecurityDefinitions';
|
||||||
export const OBJECT_DEFINTION_JSX_NAME = 'ObjectDescription';
|
export const SCHEMA_DEFINITION_JSX_NAME = 'ObjectDescription';
|
||||||
|
|
||||||
export let SECURITY_SCHEMES_SECTION_PREFIX = 'section/Authentication/';
|
export let SECURITY_SCHEMES_SECTION_PREFIX = 'section/Authentication/';
|
||||||
export function setSecuritySchemePrefix(prefix: string) {
|
export function setSecuritySchemePrefix(prefix: string) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user