Swagger 编辑器参数错误

Swagger Editor Parameter Errors

我试图在 Swagger 中起草一个 API 以便通过 SwaggerUI 轻松查看,但我遇到了我不太明白的错误。据我所知,我遵守规范。

/history/tags/{tag_id}:
  get:
    summary: "Gets the history of this tag."
    description: "Warning: not using both the start and end date fields may result in excessively long responses."
    operationId: "get_tag_history"
    produces:
    - "application/json"
    parameters:
    - name: "tag_id"
      in: "path"
      description: "UUID for this tag."
      type: "string"
      required: true
    - name: "start_date"
      in: "query"
      description: "Start date for history"
      type: "String"
      foramt: "date"
      required: false
    - name: "end_date"
      in: "query"
      description: "End date for history"
      type: "String"
      foramt: "date"
      required: false
    responses:
      200:
        description: "Operation success"
        schema: 
          $ref: "#/definitions/Tag_history"
      400:
        description: "Invalid request"

第二个和第三个参数抛出Schema error at paths./history/tags/{tag_id}.get.parameters[1] is not exactly one from <#/definitions/parameter>,<#/definitions/jsonReference>(或parameters[2],取决于哪个参数)。

我见过的大多数其他问题只是人们忘记使用 schema:,但这不是查询参数的结构。有什么想法吗?

改变

type: "String"
foramt: "date"

type: "string"
format: "date"

type区分大小写,format拼写错误。