mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-08 06:04:56 +03:00
Resolve merge conflict
This commit is contained in:
parent
4bd2e70940
commit
1f230e3e5b
|
@ -107,7 +107,6 @@ export class OperationModel implements IMenuItem {
|
||||||
this.operationId = operationSpec.operationId;
|
this.operationId = operationSpec.operationId;
|
||||||
this.path = operationSpec.pathName;
|
this.path = operationSpec.pathName;
|
||||||
this.isCallback = isCallback;
|
this.isCallback = isCallback;
|
||||||
this.codeSamples = operationSpec['x-code-samples'] || [];
|
|
||||||
|
|
||||||
if (this.isCallback) {
|
if (this.isCallback) {
|
||||||
// NOTE: Use callback's event name as the view label, not the operationID.
|
// NOTE: Use callback's event name as the view label, not the operationID.
|
||||||
|
@ -124,22 +123,6 @@ export class OperationModel implements IMenuItem {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const requestBodyContent = this.requestBody && this.requestBody.content;
|
|
||||||
if (requestBodyContent && requestBodyContent.hasSample) {
|
|
||||||
const insertInx = Math.min(this.codeSamples.length, options.payloadSampleIdx);
|
|
||||||
|
|
||||||
this.codeSamples = [
|
|
||||||
...this.codeSamples.slice(0, insertInx),
|
|
||||||
{
|
|
||||||
lang: 'payload',
|
|
||||||
label: 'Payload',
|
|
||||||
source: '',
|
|
||||||
requestBodyContent,
|
|
||||||
},
|
|
||||||
...this.codeSamples.slice(insertInx),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
const pathInfo = parser.byRef<OpenAPIPath>(
|
const pathInfo = parser.byRef<OpenAPIPath>(
|
||||||
JsonPointer.compile(['paths', operationSpec.pathName]),
|
JsonPointer.compile(['paths', operationSpec.pathName]),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user