API文档_如何更改每个API的模型格式?

时间:2018-06-19 23:31:04

标签: api swagger models

我正在通过Swagger编写API文档。 我定义的响应格式为:

definitions:
 ResponseFormat:
  type: object
  properties:
    name:
      type: string
    msg:
      type: string
      description: Error or success message
    data:
      type: object

然后,对于每个API,数据(对象)的格式都会改变。我该如何更改。

谢谢!

0 个答案:

没有答案