diff --git a/js/server/modules/@arangodb/foxx/controller.js b/js/server/modules/@arangodb/foxx/controller.js index 4032ca3d87..0323f59219 100644 --- a/js/server/modules/@arangodb/foxx/controller.js +++ b/js/server/modules/@arangodb/foxx/controller.js @@ -363,7 +363,6 @@ class Controller { this.allRoutes, this.models, newRoute, route, this.rootElement, constraints, this.extensions ); var summary; - var undocumentedBody; this.routingInfo.routes.push(newRoute); @@ -379,10 +378,10 @@ class Controller { if (method === 'post' || method === 'put' || method === 'patch') { const Model = require('@arangodb/foxx').Model; - undocumentedBody = class UndocumentedBody extends Model {}; + let UndocumentedBody = Model.extend({}); requestContext.bodyParam('undocumented body', { description: 'Undocumented body param', - type: undocumentedBody, + type: UndocumentedBody, allowInvalid: true }); }