mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 16:46:34 +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;
|
||||
}
|
||||
|
||||
export class ObjectDescription extends React.PureComponent<ObjectDescriptionProps> {
|
||||
export class SchemaDefinition extends React.PureComponent<ObjectDescriptionProps> {
|
||||
private static getMediaType(schemaRef: string, exampleRef?: string): OpenAPIMediaType {
|
||||
if (!schemaRef) {
|
||||
return {};
|
||||
|
@ -44,7 +44,7 @@ export class ObjectDescription extends React.PureComponent<ObjectDescriptionProp
|
|||
parser,
|
||||
'json',
|
||||
false,
|
||||
ObjectDescription.getMediaType(schemaRef, exampleRef),
|
||||
SchemaDefinition.getMediaType(schemaRef, exampleRef),
|
||||
options,
|
||||
);
|
||||
}
|
|
@ -10,10 +10,10 @@ import { RedocNormalizedOptions, RedocRawOptions } from './RedocNormalizedOption
|
|||
import { ScrollService } from './ScrollService';
|
||||
import { SearchStore } from './SearchStore';
|
||||
|
||||
import { ObjectDescription } from '../components/ObjectDescription/ObjectDescription';
|
||||
import { SchemaDefinition } from '../components/SchemaDefinition/SchemaDefinition';
|
||||
import { SecurityDefs } from '../components/SecuritySchemes/SecuritySchemes';
|
||||
import {
|
||||
OBJECT_DEFINTION_JSX_NAME,
|
||||
SCHEMA_DEFINITION_JSX_NAME,
|
||||
SECURITY_DEFINITIONS_COMPONENT_NAME,
|
||||
SECURITY_DEFINITIONS_JSX_NAME,
|
||||
} from '../utils/openapi';
|
||||
|
@ -162,8 +162,8 @@ const DEFAULT_OPTIONS: RedocRawOptions = {
|
|||
securitySchemes: store.spec.securitySchemes,
|
||||
}),
|
||||
},
|
||||
[OBJECT_DEFINTION_JSX_NAME]: {
|
||||
component: ObjectDescription,
|
||||
[SCHEMA_DEFINITION_JSX_NAME]: {
|
||||
component: SchemaDefinition,
|
||||
propsSelector: (store: AppStore) => ({
|
||||
parser: store.spec.parser,
|
||||
options: store.options,
|
||||
|
|
|
@ -497,7 +497,7 @@ export function normalizeServers(
|
|||
|
||||
export const SECURITY_DEFINITIONS_COMPONENT_NAME = 'security-definitions';
|
||||
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 function setSecuritySchemePrefix(prefix: string) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user