From d34304afc3f146e73fb0f5b9e846e66794775798 Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Sat, 5 Jul 2014 10:21:06 -0700 Subject: [PATCH] Make sure body parameter is shown. --- lib/swagger.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/swagger.js b/lib/swagger.js index 823c1d0..7d6a6a9 100644 --- a/lib/swagger.js +++ b/lib/swagger.js @@ -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';