From 3b3bfcbd958a881399e3b786fe645c2161e9ca02 Mon Sep 17 00:00:00 2001 From: Alan Plum Date: Mon, 18 Jan 2016 13:39:27 +0100 Subject: [PATCH] If status 200 is set to no response, imply 204 --- js/server/modules/@arangodb/foxx/router/swagger-context.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/server/modules/@arangodb/foxx/router/swagger-context.js b/js/server/modules/@arangodb/foxx/router/swagger-context.js index e58c633509..c54ffeaf0c 100644 --- a/js/server/modules/@arangodb/foxx/router/swagger-context.js +++ b/js/server/modules/@arangodb/foxx/router/swagger-context.js @@ -119,6 +119,10 @@ module.exports = exports = class SwaggerContext { statusCode = 200; } if (type === null) { + if (statusCode === 200) { + this._responses.remove(200); + statusCode = 204; + } this._responses.set(statusCode, {}); } else { let contentType = 'application/json; charset=utf-8';