Make sure body parameter is shown.

This commit is contained in:
Raymond Feng 2014-07-05 10:21:06 -07:00 committed by Samuel Reed
parent 67bb10b6a4
commit d34304afc3
1 changed files with 4 additions and 3 deletions

View File

@ -88,8 +88,9 @@ function Swagger(remotes, options) {
if (!arg.http) return true;
// Don't show derived arguments.
if (typeof arg.http === 'function') return false;
// Don't show arguments set to the incoming http request or body.
if (arg.http.source === 'req' || arg.http.source === 'body') return false;
// Don't show arguments set to the incoming http request
// Please note that body needs to be shown, such as User.create()
if (arg.http.source === 'req') return false;
return true;
});
@ -311,7 +312,7 @@ function convertVerb(verb) {
*/
function acceptToParameter(route) {
var type = 'form';
var type = 'query'; // Default to query
if (route.verb.toLowerCase() === 'get') {
type = 'query';