mirror of
https://github.com/Redocly/redoc.git
synced 2025-07-30 09:59:45 +03:00
Update 217 files
This commit is contained in:
parent
eff730bada
commit
fb55aa5456
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -19,12 +19,12 @@ npm-debug.log*
|
||||||
|
|
||||||
# Dependency directory
|
# Dependency directory
|
||||||
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
|
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
|
||||||
node_modules
|
# node_modules
|
||||||
|
|
||||||
lib/
|
lib/
|
||||||
stats.json
|
stats.json
|
||||||
cypress/
|
cypress/
|
||||||
bundles/
|
# bundles/
|
||||||
typings/*
|
typings/*
|
||||||
!typings/styled-patch.d.ts
|
!typings/styled-patch.d.ts
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ export class SectionItem extends React.Component<ContentItemProps> {
|
||||||
<>
|
<>
|
||||||
<Row>
|
<Row>
|
||||||
<MiddlePanel compact={false}>
|
<MiddlePanel compact={false}>
|
||||||
<Header>
|
<Header className="sar-header">
|
||||||
<ShareLink to={this.props.item.id} />
|
<ShareLink to={this.props.item.id} />
|
||||||
{name}
|
{name}
|
||||||
</Header>
|
</Header>
|
||||||
|
|
|
@ -65,7 +65,9 @@ export class Field extends React.Component<FieldProps> {
|
||||||
|
|
||||||
const paramName = withSubSchema ? (
|
const paramName = withSubSchema ? (
|
||||||
<ClickablePropertyNameCell
|
<ClickablePropertyNameCell
|
||||||
className={deprecated ? 'deprecated' : ''}
|
className={
|
||||||
|
deprecated ? 'deprecated ClickablePropertyNameCell' : 'ClickablePropertyNameCell'
|
||||||
|
}
|
||||||
kind={kind}
|
kind={kind}
|
||||||
title={name}
|
title={name}
|
||||||
>
|
>
|
||||||
|
@ -92,12 +94,12 @@ export class Field extends React.Component<FieldProps> {
|
||||||
<>
|
<>
|
||||||
<tr className={isLast ? 'last ' + className : className}>
|
<tr className={isLast ? 'last ' + className : className}>
|
||||||
{paramName}
|
{paramName}
|
||||||
<PropertyDetailsCell>
|
<PropertyDetailsCell className={'PropertyDetailsCell ' + field.name}>
|
||||||
<FieldDetails {...this.props} />
|
<FieldDetails {...this.props} className="FieldDetails" />
|
||||||
</PropertyDetailsCell>
|
</PropertyDetailsCell>
|
||||||
</tr>
|
</tr>
|
||||||
{expanded && withSubSchema && (
|
{expanded && withSubSchema && (
|
||||||
<tr key={field.name + 'inner'}>
|
<tr key={field.name + 'inner'} className="sar-tr">
|
||||||
<PropertyCellWithInner colSpan={2}>
|
<PropertyCellWithInner colSpan={2}>
|
||||||
<InnerPropertiesWrap>
|
<InnerPropertiesWrap>
|
||||||
<Schema
|
<Schema
|
||||||
|
|
|
@ -14,7 +14,10 @@ export class ConstraintsView extends React.PureComponent<ConstraintsViewProps> {
|
||||||
<span>
|
<span>
|
||||||
{' '}
|
{' '}
|
||||||
{this.props.constraints.map(constraint => (
|
{this.props.constraints.map(constraint => (
|
||||||
<ConstraintItem key={constraint}> {constraint} </ConstraintItem>
|
<ConstraintItem key={constraint} className="sar-ConstraintItem">
|
||||||
|
{' '}
|
||||||
|
{constraint}{' '}
|
||||||
|
</ConstraintItem>
|
||||||
))}
|
))}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
|
@ -16,7 +16,8 @@ function FieldDetailComponent({ value, label, raw }: FieldDetailProps) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<FieldLabel> {label} </FieldLabel> <ExampleValue>{stringifyValue}</ExampleValue>
|
<FieldLabel> {label} </FieldLabel>{' '}
|
||||||
|
<ExampleValue className="sar-ExampleValue">{stringifyValue}</ExampleValue>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,15 @@ export const FieldDetailsComponent = observer((props: FieldProps) => {
|
||||||
const { enumSkipQuotes, hideSchemaTitles } = React.useContext(OptionsContext);
|
const { enumSkipQuotes, hideSchemaTitles } = React.useContext(OptionsContext);
|
||||||
|
|
||||||
const { showExamples, field, renderDiscriminatorSwitch } = props;
|
const { showExamples, field, renderDiscriminatorSwitch } = props;
|
||||||
const { schema, description, deprecated, extensions, in: _in, const: _const } = field;
|
const {
|
||||||
|
schema,
|
||||||
|
description,
|
||||||
|
descriptionClass,
|
||||||
|
deprecated,
|
||||||
|
extensions,
|
||||||
|
in: _in,
|
||||||
|
const: _const,
|
||||||
|
} = field;
|
||||||
const isArrayType = schema.type === 'array';
|
const isArrayType = schema.type === 'array';
|
||||||
|
|
||||||
const rawDefault = enumSkipQuotes || _in === 'header'; // having quotes around header field default values is confusing and inappropriate
|
const rawDefault = enumSkipQuotes || _in === 'header'; // having quotes around header field default values is confusing and inappropriate
|
||||||
|
@ -57,10 +65,10 @@ export const FieldDetailsComponent = observer((props: FieldProps) => {
|
||||||
: schema.default;
|
: schema.default;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="FieldDetailsDiv">
|
||||||
<div>
|
<div className="FieldDetailsDiv__childDiv1">
|
||||||
<TypePrefix>{schema.typePrefix}</TypePrefix>
|
<TypePrefix>{schema.typePrefix}</TypePrefix>
|
||||||
<TypeName>{schema.displayType}</TypeName>
|
<TypeName className="sar-TypeName">{schema.displayType}</TypeName>
|
||||||
{schema.displayFormat && (
|
{schema.displayFormat && (
|
||||||
<TypeFormat>
|
<TypeFormat>
|
||||||
{' '}
|
{' '}
|
||||||
|
@ -96,20 +104,29 @@ export const FieldDetailsComponent = observer((props: FieldProps) => {
|
||||||
<Badge type="warning"> {l('deprecated')} </Badge>
|
<Badge type="warning"> {l('deprecated')} </Badge>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<FieldDetail raw={rawDefault} label={l('default') + ':'} value={defaultValue} />
|
<div className="FieldDetailsDiv__childDiv2">
|
||||||
{!renderDiscriminatorSwitch && (
|
<FieldDetail raw={rawDefault} label={l('default') + ':'} value={defaultValue} />
|
||||||
<EnumValues isArrayType={isArrayType} values={schema.enum} />
|
</div>
|
||||||
)}{' '}
|
|
||||||
{renderedExamples}
|
<div className="FieldDetailsDiv__childDiv3">
|
||||||
<Extensions extensions={{ ...extensions, ...schema.extensions }} />
|
{!renderDiscriminatorSwitch && (
|
||||||
<div>
|
<EnumValues isArrayType={isArrayType} values={schema.enum} />
|
||||||
|
)}{' '}
|
||||||
|
{renderedExamples}
|
||||||
|
</div>
|
||||||
|
<div className="FieldDetailsDiv__childDiv4">
|
||||||
|
<Extensions extensions={{ ...extensions, ...schema.extensions }} />
|
||||||
|
</div>
|
||||||
|
<div className={descriptionClass + ' FieldDetailsDiv__description'}>
|
||||||
<Markdown compact={true} source={description} />
|
<Markdown compact={true} source={description} />
|
||||||
</div>
|
</div>
|
||||||
{schema.externalDocs && (
|
<div className="FieldDetailsDiv__childDiv6">
|
||||||
<ExternalDocumentation externalDocs={schema.externalDocs} compact={true} />
|
{schema.externalDocs && (
|
||||||
)}
|
<ExternalDocumentation externalDocs={schema.externalDocs} compact={true} />
|
||||||
{(renderDiscriminatorSwitch && renderDiscriminatorSwitch(props)) || null}
|
)}
|
||||||
{(_const && <FieldDetail label={l('const') + ':'} value={_const} />) || null}
|
{(renderDiscriminatorSwitch && renderDiscriminatorSwitch(props)) || null}
|
||||||
|
{(_const && <FieldDetail label={l('const') + ':'} value={_const} />) || null}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -10,7 +10,17 @@ export interface ResponseViewProps {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ResponseView = observer(({ response }: ResponseViewProps): React.ReactElement => {
|
export const ResponseView = observer(({ response }: ResponseViewProps): React.ReactElement => {
|
||||||
const { extensions, headers, type, summary, description, code, expanded, content } = response;
|
const {
|
||||||
|
extensions,
|
||||||
|
headers,
|
||||||
|
type,
|
||||||
|
summary,
|
||||||
|
description,
|
||||||
|
descriptionClass,
|
||||||
|
code,
|
||||||
|
expanded,
|
||||||
|
content,
|
||||||
|
} = response;
|
||||||
|
|
||||||
const mimes = React.useMemo<MediaTypeModel[]>(
|
const mimes = React.useMemo<MediaTypeModel[]>(
|
||||||
() =>
|
() =>
|
||||||
|
@ -29,14 +39,17 @@ export const ResponseView = observer(({ response }: ResponseViewProps): React.Re
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<StyledResponseTitle
|
<span className="StyledResponseTitle">
|
||||||
onClick={() => response.toggle()}
|
<StyledResponseTitle
|
||||||
type={type}
|
onClick={() => response.toggle()}
|
||||||
empty={empty}
|
type={type}
|
||||||
title={summary || ''}
|
empty={empty}
|
||||||
code={code}
|
title={summary || ''}
|
||||||
opened={expanded}
|
descriptionClass={descriptionClass}
|
||||||
/>
|
code={code}
|
||||||
|
opened={expanded}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
{expanded && !empty && (
|
{expanded && !empty && (
|
||||||
<ResponseDetailsWrap>
|
<ResponseDetailsWrap>
|
||||||
<ResponseDetails response={response} />
|
<ResponseDetails response={response} />
|
||||||
|
|
|
@ -14,10 +14,12 @@ import { ConstraintsView } from '../Fields/FieldContstraints';
|
||||||
|
|
||||||
export class ResponseDetails extends React.PureComponent<{ response: ResponseModel }> {
|
export class ResponseDetails extends React.PureComponent<{ response: ResponseModel }> {
|
||||||
render() {
|
render() {
|
||||||
const { description, extensions, headers, content } = this.props.response;
|
const { description, descriptionClass, extensions, headers, content } = this.props.response;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{description && <Markdown source={description} />}
|
<span className={descriptionClass + ' ResponseDetails__description'}>
|
||||||
|
{description && <Markdown source={description} />}
|
||||||
|
</span>
|
||||||
<Extensions extensions={extensions} />
|
<Extensions extensions={extensions} />
|
||||||
<ResponseHeaders headers={headers} />
|
<ResponseHeaders headers={headers} />
|
||||||
<MediaTypesSwitch content={content} renderDropdown={this.renderDropdown}>
|
<MediaTypesSwitch content={content} renderDropdown={this.renderDropdown}>
|
||||||
|
|
|
@ -8,6 +8,7 @@ export interface ResponseTitleProps {
|
||||||
code: string;
|
code: string;
|
||||||
title: string;
|
title: string;
|
||||||
type: string;
|
type: string;
|
||||||
|
descriptionClass?: string;
|
||||||
empty?: boolean;
|
empty?: boolean;
|
||||||
opened?: boolean;
|
opened?: boolean;
|
||||||
className?: string;
|
className?: string;
|
||||||
|
@ -19,6 +20,7 @@ function ResponseTitleComponent({
|
||||||
type,
|
type,
|
||||||
empty,
|
empty,
|
||||||
code,
|
code,
|
||||||
|
descriptionClass,
|
||||||
opened,
|
opened,
|
||||||
className,
|
className,
|
||||||
onClick,
|
onClick,
|
||||||
|
@ -39,7 +41,9 @@ function ResponseTitleComponent({
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Code>{code} </Code>
|
<Code>{code} </Code>
|
||||||
<Markdown compact={true} inline={true} source={title} />
|
<div className={descriptionClass + ' ResponseTitleComponent__Markdown'}>
|
||||||
|
<Markdown compact={true} inline={true} source={title} />
|
||||||
|
</div>
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ export class ResponsesList extends React.PureComponent<ResponseListProps> {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="ResponsesList">
|
||||||
<ResponsesHeader>{isCallback ? l('callbackResponses') : l('responses')}</ResponsesHeader>
|
<ResponsesHeader>{isCallback ? l('callbackResponses') : l('responses')}</ResponsesHeader>
|
||||||
{responses.map(response => {
|
{responses.map(response => {
|
||||||
return <ResponseView key={response.code} response={response} />;
|
return <ResponseView key={response.code} response={response} />;
|
||||||
|
|
|
@ -22,21 +22,14 @@
|
||||||
"type": {
|
"type": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The type of response.",
|
"description": "The type of response.",
|
||||||
"enum": [
|
"enum": ["TestResponse.Complete"]
|
||||||
"TestResponse.Complete"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": ["FAILURE", "SUCCESS"]
|
||||||
"FAILURE",
|
|
||||||
"SUCCESS"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": ["status"]
|
||||||
"status"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,7 @@
|
||||||
"schemas": {
|
"schemas": {
|
||||||
"Pet": {
|
"Pet": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": ["type"],
|
||||||
"type"
|
|
||||||
],
|
|
||||||
"discriminator": {
|
"discriminator": {
|
||||||
"propertyName": "type"
|
"propertyName": "type"
|
||||||
},
|
},
|
||||||
|
|
|
@ -18,9 +18,7 @@
|
||||||
"summary": "Get a cat details after update",
|
"summary": "Get a cat details after update",
|
||||||
"description": "Get a cat details after update",
|
"description": "Get a cat details after update",
|
||||||
"operationId": "updatedCat",
|
"operationId": "updatedCat",
|
||||||
"tags": [
|
"tags": ["pet"],
|
||||||
"pet"
|
|
||||||
],
|
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"description": "Information about cat in the system",
|
"description": "Information about cat in the system",
|
||||||
"content": {
|
"content": {
|
||||||
|
@ -41,9 +39,7 @@
|
||||||
"summary": "Create new cat",
|
"summary": "Create new cat",
|
||||||
"description": "Info about new cat",
|
"description": "Info about new cat",
|
||||||
"operationId": "createdCat",
|
"operationId": "createdCat",
|
||||||
"tags": [
|
"tags": ["pet"],
|
||||||
"pet"
|
|
||||||
],
|
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"description": "Information about cat in the system",
|
"description": "Information about cat in the system",
|
||||||
"content": {
|
"content": {
|
||||||
|
|
|
@ -1,64 +1,57 @@
|
||||||
{
|
{
|
||||||
"openapi": "3.0.0",
|
"openapi": "3.0.0",
|
||||||
"info": {
|
"info": {
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"title": "Foo"
|
"title": "Foo"
|
||||||
},
|
},
|
||||||
"components": {
|
"components": {
|
||||||
"callbacks": {
|
"callbacks": {
|
||||||
"Test": {
|
"Test": {
|
||||||
"post": {
|
"post": {
|
||||||
"operationId": "testCallback",
|
"operationId": "testCallback",
|
||||||
"description": "Test callback.",
|
"description": "Test callback.",
|
||||||
"requestBody": {
|
"requestBody": {
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"title": "TestTitle",
|
"title": "TestTitle",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "Test description",
|
"description": "Test description",
|
||||||
"properties": {
|
"properties": {
|
||||||
"type": {
|
"type": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "The type of response.",
|
"description": "The type of response.",
|
||||||
"enum": [
|
"enum": ["TestResponse.Complete"]
|
||||||
"TestResponse.Complete"
|
},
|
||||||
]
|
"status": {
|
||||||
},
|
"type": "string",
|
||||||
"status": {
|
"enum": ["FAILURE", "SUCCESS"]
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"FAILURE",
|
|
||||||
"SUCCESS"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"status"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
"required": ["status"]
|
||||||
},
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"name": "X-Test-Header",
|
|
||||||
"in": "header",
|
|
||||||
"required": true,
|
|
||||||
"example": "1",
|
|
||||||
"description": "This is a test header parameter",
|
|
||||||
"schema": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"204": {
|
|
||||||
"description": "Test response."
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "X-Test-Header",
|
||||||
|
"in": "header",
|
||||||
|
"required": true,
|
||||||
|
"example": "1",
|
||||||
|
"description": "This is a test header parameter",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"204": {
|
||||||
|
"description": "Test response."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -28,9 +28,7 @@
|
||||||
"JsonApiResource": {
|
"JsonApiResource": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "A related resource.",
|
"description": "A related resource.",
|
||||||
"required": [
|
"required": ["type"],
|
||||||
"type"
|
|
||||||
],
|
|
||||||
"discriminator": {
|
"discriminator": {
|
||||||
"propertyName": "type"
|
"propertyName": "type"
|
||||||
},
|
},
|
||||||
|
@ -43,9 +41,7 @@
|
||||||
},
|
},
|
||||||
"FooTopLevel": {
|
"FooTopLevel": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": ["data"],
|
||||||
"data"
|
|
||||||
],
|
|
||||||
"properties": {
|
"properties": {
|
||||||
"data": {
|
"data": {
|
||||||
"$ref": "#/components/schemas/Foo"
|
"$ref": "#/components/schemas/Foo"
|
||||||
|
|
|
@ -58,21 +58,24 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"WithArray": {
|
"WithArray": {
|
||||||
"oneOf": [{
|
"oneOf": [
|
||||||
"type" : "array",
|
{
|
||||||
"items": {
|
"type": "array",
|
||||||
"oneOf": [
|
"items": {
|
||||||
{
|
"oneOf": [
|
||||||
"type": "string"
|
{
|
||||||
},
|
"type": "string"
|
||||||
{
|
},
|
||||||
"type": "number"
|
{
|
||||||
}
|
"type": "number"
|
||||||
]
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
}
|
}
|
||||||
}, {
|
]
|
||||||
"type": "string"
|
|
||||||
}]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@ export class FieldModel {
|
||||||
name: string;
|
name: string;
|
||||||
required: boolean;
|
required: boolean;
|
||||||
description: string;
|
description: string;
|
||||||
|
descriptionClass: string;
|
||||||
example?: string;
|
example?: string;
|
||||||
examples?: Record<string, ExampleModel> | any[];
|
examples?: Record<string, ExampleModel> | any[];
|
||||||
deprecated: boolean;
|
deprecated: boolean;
|
||||||
|
@ -117,6 +118,8 @@ export class FieldModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.const = this.schema?.const || info?.const || '';
|
this.const = this.schema?.const || info?.const || '';
|
||||||
|
|
||||||
|
this.descriptionClass = info.descriptionClass || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
|
|
@ -25,6 +25,7 @@ export class ResponseModel {
|
||||||
code: string;
|
code: string;
|
||||||
summary: string;
|
summary: string;
|
||||||
description: string;
|
description: string;
|
||||||
|
descriptionClass?: string;
|
||||||
type: string;
|
type: string;
|
||||||
headers: FieldModel[] = [];
|
headers: FieldModel[] = [];
|
||||||
extensions: Record<string, any>;
|
extensions: Record<string, any>;
|
||||||
|
@ -68,6 +69,8 @@ export class ResponseModel {
|
||||||
if (options.showExtensions) {
|
if (options.showExtensions) {
|
||||||
this.extensions = extractExtensions(info, options.showExtensions);
|
this.extensions = extractExtensions(info, options.showExtensions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.descriptionClass = info.descriptionClass || '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
|
|
@ -91,6 +91,7 @@ export interface OpenAPIParameter {
|
||||||
name: string;
|
name: string;
|
||||||
in?: OpenAPIParameterLocation;
|
in?: OpenAPIParameterLocation;
|
||||||
description?: string;
|
description?: string;
|
||||||
|
descriptionClass?: string;
|
||||||
required?: boolean;
|
required?: boolean;
|
||||||
deprecated?: boolean;
|
deprecated?: boolean;
|
||||||
allowEmptyValue?: boolean;
|
allowEmptyValue?: boolean;
|
||||||
|
@ -196,6 +197,7 @@ export type OpenAPIParameterStyle =
|
||||||
|
|
||||||
export interface OpenAPIRequestBody {
|
export interface OpenAPIRequestBody {
|
||||||
description?: string;
|
description?: string;
|
||||||
|
descriptionClass?: string;
|
||||||
required?: boolean;
|
required?: boolean;
|
||||||
content: { [mime: string]: OpenAPIMediaType };
|
content: { [mime: string]: OpenAPIMediaType };
|
||||||
|
|
||||||
|
@ -208,7 +210,10 @@ export interface OpenAPIResponses {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OpenAPIResponse
|
export interface OpenAPIResponse
|
||||||
extends Pick<OpenAPIRequestBody, 'description' | 'x-examples' | 'x-example'> {
|
extends Pick<
|
||||||
|
OpenAPIRequestBody,
|
||||||
|
'description' | 'descriptionClass' | 'x-examples' | 'x-example'
|
||||||
|
> {
|
||||||
headers?: { [name: string]: Referenced<OpenAPIHeader> };
|
headers?: { [name: string]: Referenced<OpenAPIHeader> };
|
||||||
links?: { [name: string]: Referenced<OpenAPILink> };
|
links?: { [name: string]: Referenced<OpenAPILink> };
|
||||||
content?: { [mime: string]: OpenAPIMediaType };
|
content?: { [mime: string]: OpenAPIMediaType };
|
||||||
|
|
Loading…
Reference in New Issue
Block a user