mirror of https://gitee.com/bigwinds/arangodb
No response schema if no response type
This commit is contained in:
parent
3b3bfcbd95
commit
d23f42fafc
|
@ -334,13 +334,14 @@ module.exports = exports = class SwaggerContext {
|
|||
? (def.type.schema || def.type)
|
||||
: null
|
||||
);
|
||||
const response = {
|
||||
schema: (
|
||||
const response = {};
|
||||
if (def.contentType) {
|
||||
response.schema = (
|
||||
schema && schema.isJoi
|
||||
? joi2schema(schema)
|
||||
: {type: 'string'}
|
||||
)
|
||||
};
|
||||
);
|
||||
}
|
||||
if (schema && schema.isJoi && schema._description) {
|
||||
response.description = schema._description;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue