From e77e18bbc961fcf79f369c4314e847ee45e5129c Mon Sep 17 00:00:00 2001 From: Alan Plum Date: Mon, 20 Jun 2016 21:41:09 +0200 Subject: [PATCH] Fix swagger a litle bit --- js/server/modules/@arangodb/foxx/legacy/swagger.js | 2 +- js/server/modules/@arangodb/foxx/router/swagger-context.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/server/modules/@arangodb/foxx/legacy/swagger.js b/js/server/modules/@arangodb/foxx/legacy/swagger.js index de00ffc8d2..5365cb922d 100644 --- a/js/server/modules/@arangodb/foxx/legacy/swagger.js +++ b/js/server/modules/@arangodb/foxx/legacy/swagger.js @@ -115,7 +115,7 @@ function resolveFoxx(req, res, appPath) { } function swaggerJson(req, res, opts) { - let mount = mount || opts.mount; + let mount = opts.mount; let foxx = opts.foxx || resolveFoxx(req, res, mount); let docs = foxx.docs; if (!docs) { diff --git a/js/server/modules/@arangodb/foxx/router/swagger-context.js b/js/server/modules/@arangodb/foxx/router/swagger-context.js index da7808613e..f16293db95 100644 --- a/js/server/modules/@arangodb/foxx/router/swagger-context.js +++ b/js/server/modules/@arangodb/foxx/router/swagger-context.js @@ -395,8 +395,8 @@ module.exports = exports = class SwaggerContext { } operation.responses = { - default: { - description: 'Unexpected error.', + 500: { + description: 'Default error response.', schema: joi2schema(DEFAULT_ERROR_SCHEMA) } };