类型"文件" swagger api-doc验证失败

时间:2015-12-21 10:27:03

标签: api yaml swagger swagger-ui api-doc

以下是我的招摇定义:

  Abc:
    type: object
    properties:
      status:
        type: string
        enum: ["read","unread"]
      body:
        type: string
      attachments:
        type: array
        items: {
          $ref: '#/definitions/Attachment'
        }
  Attachment:
    type: object
    properties:
      attachmentName:
        type: string
      attachmentFile:
        type: file

尝试在editor.swagger.io上验证我的api-doc时出现以下错误。有什么想法吗?

code:  "ANY_OF_MISSING"
message:  "Data does not match any schemas from 'anyOf'"
(detail in stacktrace)
code:  "ENUM_MISMATCH"
message:  "No enum match for: file"

0 个答案:

没有答案