我正在创建一个OpenAPI(Swagger)定义,并在http://editor.swagger.io中检查其有效性。出于某种原因,Swagger Editor显示了这个错误:
Schema error at paths['/some-endpoint/{id}/name-and-address'].get.parameters[0]
should NOT have additional properties
additionalProperty: type, allowEmptyValue, enum, name, in, description, required
Jump to line 142
以下是我的YAML文件:
paths:
'/some-endpoint/{id}/name-and-address':
get:
tags:
- InvolvedParty
summary: Retrieve basic information about...
operationId: getNameAndAddressUsingGET
produces:
- '*/*'
parameters:
- name: id
in: path
description: The unique identification
required: true
type: string
allowEmptyValue: false
enum:
- '@coderange[1'
- 'infinity]'
responses:
'200':
description: Success
我还没有添加任何其他属性,因为错误消息暗示。如何解决此错误?