Added operationId check

This commit is contained in:
frikky
2020-10-13 01:35:53 +02:00
parent d40d377fa1
commit c0474d400a
+7 -1
View File
@@ -418,8 +418,13 @@ const AppCreator = (props) => {
continue continue
} }
var tmpname = methodvalue.summary
if (methodvalue.operationId !== undefined && methodvalue.operationId !== null && methodvalue.operationId.length > 0) {
tmpname = methodvalue.operationId
}
var newaction = { var newaction = {
"name": methodvalue.summary, "name": tmpname,
"description": methodvalue.description, "description": methodvalue.description,
"url": path, "url": path,
"method": method.toUpperCase(), "method": method.toUpperCase(),
@@ -668,6 +673,7 @@ const AppCreator = (props) => {
} }
}, },
"summary": item.name, "summary": item.name,
"operationId": item.name.split(" ").join("_"),
"description": item.description, "description": item.description,
"parameters": [] "parameters": []
} }