Resolve merge conflict

This commit is contained in:
Jonathan Bailey 2020-01-17 09:09:15 -05:00
parent 4bd2e70940
commit 1f230e3e5b

View File

@ -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]),
); );