身体参数上的swagger 2.0错误

时间:2017-09-07 08:04:55

标签: swagger-2.0

我有两个错误

- name: data

旁边
Schema error at paths['/datas/{id}'].patch.parameters[1]
should NOT have additional properties
additionalProperty: descripton, schema, name, in, required

- in: body

旁边
Schema error at paths['/datas/{id}'].patch.parameters[1].in
should be equal to one of the allowed values
allowedValues: header, formData, query, path

我只有补丁方法和身体参数的错误

swaggger.yml

swagger: '2.0'
patch:
  summary: Update one data
  description: |
    Update a data
  tags:
    - datas
  parameters:
    - name: id
      in: path
      description: ID of the data to update
      required: true
      type: integer
    - name: data
      in: body
      descripton: name of the data
      required: true
      schema:
        $ref: '#/definitions/patchData'
  responses:
    '204':
      description: Update successful

我在这里查看规格 https://swagger.io/docs/specification/2-0/describing-request-body/

0 个答案:

没有答案
相关问题