Update openapi-collection.js

Swap order for the source of the operationName when importing from openApi with a summary
This commit is contained in:
Gianluca 2023-11-20 11:00:54 +01:00 committed by GitHub
parent 3f80a4dfa2
commit 4d9549d2cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@ const buildEmptyJsonBody = (bodySchema) => {
const transformOpenapiRequestItem = (request) => {
let _operationObject = request.operationObject;
let operationName = _operationObject.operationId || _operationObject.summary || _operationObject.description;
let operationName = _operationObject.summary || _operationObject.operationId || _operationObject.description;
if (!operationName) {
operationName = `${request.method} ${request.path}`;
}