mirror of https://gitee.com/bigwinds/arangodb
Fix UndocumentedBody
This commit is contained in:
parent
ac291a9a17
commit
8cd34bc586
|
@ -363,7 +363,6 @@ class Controller {
|
||||||
this.allRoutes, this.models, newRoute, route, this.rootElement, constraints, this.extensions
|
this.allRoutes, this.models, newRoute, route, this.rootElement, constraints, this.extensions
|
||||||
);
|
);
|
||||||
var summary;
|
var summary;
|
||||||
var undocumentedBody;
|
|
||||||
|
|
||||||
this.routingInfo.routes.push(newRoute);
|
this.routingInfo.routes.push(newRoute);
|
||||||
|
|
||||||
|
@ -379,10 +378,10 @@ class Controller {
|
||||||
|
|
||||||
if (method === 'post' || method === 'put' || method === 'patch') {
|
if (method === 'post' || method === 'put' || method === 'patch') {
|
||||||
const Model = require('@arangodb/foxx').Model;
|
const Model = require('@arangodb/foxx').Model;
|
||||||
undocumentedBody = class UndocumentedBody extends Model {};
|
let UndocumentedBody = Model.extend({});
|
||||||
requestContext.bodyParam('undocumented body', {
|
requestContext.bodyParam('undocumented body', {
|
||||||
description: 'Undocumented body param',
|
description: 'Undocumented body param',
|
||||||
type: undocumentedBody,
|
type: UndocumentedBody,
|
||||||
allowInvalid: true
|
allowInvalid: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue