mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
deafault order for request name is summary , operationId, path
This commit is contained in:
19
lib/util.js
19
lib/util.js
@@ -951,10 +951,21 @@ module.exports = {
|
||||
}
|
||||
pathVarArray = this.convertPathVariables('root', [], pathVariables);
|
||||
}
|
||||
reqName = this.options.requestName === 'fallback' ?
|
||||
operation.summary || operation.operationId || (displayUrl || baseUrl) : (
|
||||
this.options.requestName === 'url' ? (displayUrl || baseUrl) :
|
||||
operation[this.options.requestName]);
|
||||
// requestName
|
||||
switch (this.options.requestName) {
|
||||
case 'fallback' : {
|
||||
reqName = operation.summary || operation.operationId || reqUrl;
|
||||
break;
|
||||
}
|
||||
case 'url' : {
|
||||
reqName = displayUrl || baseUrl;
|
||||
break;
|
||||
}
|
||||
default : {
|
||||
reqName = operation[this.options.requestName];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!reqName) {
|
||||
throw new Error(`requestName (${this.options.requestName})` +
|
||||
` in options is invalid or property does not exist in ${operationItem.path}`);
|
||||
|
||||
Reference in New Issue
Block a user