mirror of https://gitee.com/bigwinds/arangodb
QueryParam and friends should allow omitting schemas
This commit is contained in:
parent
8224153c72
commit
96d0f5f4ab
|
@ -70,16 +70,28 @@ module.exports = exports = class SwaggerContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
header(name, schema, description) {
|
header(name, schema, description) {
|
||||||
|
if (typeof schema === 'string') {
|
||||||
|
description = schema;
|
||||||
|
schema = undefined;
|
||||||
|
}
|
||||||
this._headers.set(name, {schema, description});
|
this._headers.set(name, {schema, description});
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
pathParam(name, schema, description) {
|
pathParam(name, schema, description) {
|
||||||
|
if (typeof schema === 'string') {
|
||||||
|
description = schema;
|
||||||
|
schema = undefined;
|
||||||
|
}
|
||||||
this._pathParams.set(name, {schema, description});
|
this._pathParams.set(name, {schema, description});
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
queryParam(name, schema, description) {
|
queryParam(name, schema, description) {
|
||||||
|
if (typeof schema === 'string') {
|
||||||
|
description = schema;
|
||||||
|
schema = undefined;
|
||||||
|
}
|
||||||
this._queryParams.set(name, {schema, description});
|
this._queryParams.set(name, {schema, description});
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue