mirror of
https://github.com/Redocly/redoc.git
synced 2025-07-29 17:40:05 +03:00
revert(): Revert custom properties from operation
This commit is contained in:
parent
9cc2e672e3
commit
1a9cb581bf
|
@ -25,7 +25,6 @@ import type { OpenAPIParser } from '../OpenAPIParser';
|
||||||
import type { RedocNormalizedOptions } from '../RedocNormalizedOptions';
|
import type { RedocNormalizedOptions } from '../RedocNormalizedOptions';
|
||||||
import type { MediaContentModel } from './MediaContent';
|
import type { MediaContentModel } from './MediaContent';
|
||||||
import type { ContentItemModel, ExtendedOpenAPIOperation, IMenuItem } from '../types';
|
import type { ContentItemModel, ExtendedOpenAPIOperation, IMenuItem } from '../types';
|
||||||
import { MilesConstants } from '../../types';
|
|
||||||
|
|
||||||
export interface XPayloadSample {
|
export interface XPayloadSample {
|
||||||
lang: 'payload';
|
lang: 'payload';
|
||||||
|
@ -81,8 +80,6 @@ export class OperationModel implements IMenuItem {
|
||||||
isWebhook: boolean;
|
isWebhook: boolean;
|
||||||
isEvent: boolean;
|
isEvent: boolean;
|
||||||
|
|
||||||
extraDescription: Record<string, boolean>;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private parser: OpenAPIParser,
|
private parser: OpenAPIParser,
|
||||||
private operationSpec: ExtendedOpenAPIOperation,
|
private operationSpec: ExtendedOpenAPIOperation,
|
||||||
|
@ -138,12 +135,6 @@ export class OperationModel implements IMenuItem {
|
||||||
security => new SecurityRequirementModel(security, parser),
|
security => new SecurityRequirementModel(security, parser),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (operationSpec[MilesConstants.MILES_EXTRA_DESCRIPTION_PROPERTY_NAME] == undefined) {
|
|
||||||
this.extraDescription = operationSpec.extraDescription;
|
|
||||||
} else {
|
|
||||||
this.extraDescription = operationSpec[MilesConstants.MILES_EXTRA_DESCRIPTION_PROPERTY_NAME];
|
|
||||||
}
|
|
||||||
|
|
||||||
this.servers = normalizeServers(
|
this.servers = normalizeServers(
|
||||||
parser.specUrl,
|
parser.specUrl,
|
||||||
operationSpec.servers || operationSpec.pathServers || parser.spec.servers || [],
|
operationSpec.servers || operationSpec.pathServers || parser.spec.servers || [],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user