Swagger Editor shows the “Schema error: should NOT have additional properties” error for a path parameter
Swagger Editor shows the “Schema error: should NOT have additional properties” error for a path parameter
我正在创建一个 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
我没有按照错误消息的提示添加任何其他属性。如何修复此错误?
删除 allowEmptyValue
- 它仅与查询和 formData 参数一起使用,但不与路径参数一起使用。
我正在创建一个 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
我没有按照错误消息的提示添加任何其他属性。如何修复此错误?
删除 allowEmptyValue
- 它仅与查询和 formData 参数一起使用,但不与路径参数一起使用。