Skip to content

Commit

Permalink
Fix default consumes for methods
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagobustamante committed May 15, 2017
1 parent 4f8d660 commit 3a42ec3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/swagger/generator.ts
Expand Up @@ -164,7 +164,7 @@ export class SpecGenerator {
} else if (this.hasFormParams(method)) {
pathMethod.consumes = pathMethod.consumes || [];
pathMethod.consumes.push('application/x-www-form-urlencoded');
} else if (this.supportsBodyParameters(method.name)) {
} else if (this.supportsBodyParameters(method.method)) {
pathMethod.consumes = pathMethod.consumes || [];
pathMethod.consumes.push('application/json');
}
Expand Down

0 comments on commit 3a42ec3

Please sign in to comment.