From d98a7877d46dccb036c7e653e548673f39f7829f Mon Sep 17 00:00:00 2001 From: Samuel Reed Date: Tue, 12 Aug 2014 12:44:16 -0400 Subject: [PATCH] Newest Swagger UI requires application/x-www-form-urlencoded. UI will fail to POST if this consumes type is not specified. --- lib/swagger.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/swagger.js b/lib/swagger.js index d517303..bcf3e07 100644 --- a/lib/swagger.js +++ b/lib/swagger.js @@ -26,8 +26,8 @@ function Swagger(loopbackApplication, swaggerApp, opts) { swaggerVersion: '1.2', basePath: loopbackApplication.get('restApiRoot') || '/api', resourcePath: 'resources', - // Default consumes/produces to application/json - consumes: ['application/json'], + // Default consumes/produces + consumes: ['application/json', 'application/x-www-form-urlencoded'], produces: ['application/json'], version: getVersion() });