0

以下是我大摇大摆的定义:

  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"
4

0 回答 0