oms/app/contract/index.js

17 lines
488 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use strict';
/**
* Swagger 契约(数据结构)定义。
* 在 Controller 注释中通过 `@Request` / `@Response` 引用这里的 key。
*/
module.exports = {
baseResponse: {
code: { type: 'integer', description: '业务状态码,0 表示成功' },
message: { type: 'string', description: '提示信息' },
data: { type: 'string', description: '业务数据(JSON)' },
},
homeResponse: {
text: { type: 'string', description: '欢迎文本' },
},
};