mirror of
https://github.com/Redocly/redoc.git
synced 2025-07-29 17:40:05 +03:00
feat(): Expose extra endpoint information
This commit is contained in:
parent
efbcec58a0
commit
6222fe0e41
|
@ -13,7 +13,7 @@ import { ExternalDocumentation } from '../ExternalDocumentation/ExternalDocument
|
||||||
import { Markdown } from '../Markdown/Markdown';
|
import { Markdown } from '../Markdown/Markdown';
|
||||||
import { EnumValues } from './EnumValues';
|
import { EnumValues } from './EnumValues';
|
||||||
import { Extensions } from './Extensions';
|
import { Extensions } from './Extensions';
|
||||||
import { ExtraDescription } from './ExtraDescriptions';
|
import { ExtraDescription } from '../Custom/ExtraDescriptions';
|
||||||
import { FieldProps } from './Field';
|
import { FieldProps } from './Field';
|
||||||
import { Examples } from './Examples';
|
import { Examples } from './Examples';
|
||||||
import { ConstraintsView } from './FieldContstraints';
|
import { ConstraintsView } from './FieldContstraints';
|
||||||
|
@ -25,6 +25,7 @@ import { l } from '../../services/Labels';
|
||||||
import { OptionsContext } from '../OptionsProvider';
|
import { OptionsContext } from '../OptionsProvider';
|
||||||
import { Pattern } from './Pattern';
|
import { Pattern } from './Pattern';
|
||||||
import { ArrayItemDetails } from './ArrayItemDetails';
|
import { ArrayItemDetails } from './ArrayItemDetails';
|
||||||
|
import { ExtraOperationInformation } from '../Custom/ExtraOperationInformation';
|
||||||
|
|
||||||
export const FieldDetailsComponent = observer((props: FieldProps) => {
|
export const FieldDetailsComponent = observer((props: FieldProps) => {
|
||||||
const { enumSkipQuotes, hideSchemaTitles } = React.useContext(OptionsContext);
|
const { enumSkipQuotes, hideSchemaTitles } = React.useContext(OptionsContext);
|
||||||
|
@ -38,6 +39,7 @@ export const FieldDetailsComponent = observer((props: FieldProps) => {
|
||||||
in: _in,
|
in: _in,
|
||||||
const: _const,
|
const: _const,
|
||||||
extraDescription,
|
extraDescription,
|
||||||
|
extraApiReferenceForValidation,
|
||||||
} = field;
|
} = field;
|
||||||
const isArrayType = schema.type === 'array';
|
const isArrayType = schema.type === 'array';
|
||||||
|
|
||||||
|
@ -109,6 +111,13 @@ export const FieldDetailsComponent = observer((props: FieldProps) => {
|
||||||
{!renderDiscriminatorSwitch && (
|
{!renderDiscriminatorSwitch && (
|
||||||
<EnumValues isArrayType={isArrayType} values={schema.enum} />
|
<EnumValues isArrayType={isArrayType} values={schema.enum} />
|
||||||
)}{' '}
|
)}{' '}
|
||||||
|
{!!extraApiReferenceForValidation && (
|
||||||
|
<ExtraOperationInformation
|
||||||
|
httpVerb={extraApiReferenceForValidation.httpVerb}
|
||||||
|
label={extraApiReferenceForValidation.label}
|
||||||
|
description={extraApiReferenceForValidation.description}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{extraDescription && <ExtraDescription extraDescriptions={extraDescription} />}
|
{extraDescription && <ExtraDescription extraDescriptions={extraDescription} />}
|
||||||
{renderedExamples}
|
{renderedExamples}
|
||||||
<Extensions extensions={{ ...extensions, ...schema.extensions }} />
|
<Extensions extensions={{ ...extensions, ...schema.extensions }} />
|
||||||
|
|
Loading…
Reference in New Issue
Block a user