Skip to content

Commit 12e51d4

Browse files
committed
OperationId as a type name
1 parent e549b80 commit 12e51d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/swagger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function getAllEndPoints(schema) {
4747
Object.keys(route).forEach(method => {
4848
const obj = route[method];
4949
const isMutation = ['post', 'put', 'patch', 'delete'].indexOf(method) !== -1;
50-
const typeName = getGQLTypeNameFromURL(method, path);
50+
const typeName = obj.operationId || getGQLTypeNameFromURL(method, path);
5151
const parameters = obj.parameters ? obj.parameters.map(param => {
5252
const type = param.type;
5353
return {name: replaceOddChars(param.name), type, jsonSchema: param};

0 commit comments

Comments
 (0)