Skip to content

Commit 3a42ec3

Browse files
Fix default consumes for methods
1 parent 4f8d660 commit 3a42ec3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/swagger/generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export class SpecGenerator {
164164
} else if (this.hasFormParams(method)) {
165165
pathMethod.consumes = pathMethod.consumes || [];
166166
pathMethod.consumes.push('application/x-www-form-urlencoded');
167-
} else if (this.supportsBodyParameters(method.name)) {
167+
} else if (this.supportsBodyParameters(method.method)) {
168168
pathMethod.consumes = pathMethod.consumes || [];
169169
pathMethod.consumes.push('application/json');
170170
}

0 commit comments

Comments
 (0)