I face issue with my swagger file :
swagger: '2.0'
paths:
/currencies:
get:
responses:
'200':
description: ''
summary: 'list currencies summary'
x-auth-type: None
x-throttling-tier: Unlimited
produces:
- application/json
description: 'list currencies description'
'/currencies/{currencieId}':
get:
responses:
'200':
description: ''
description: 'Single currency description'
parameters:
- name: currencieId
in: path
allowMultiple: false
required: true
type: string
description: 'paramter description'
summary: 'Single currency'
x-auth-type: None
x-throttling-tier: Unlimited
produces:
- application/json
info:
title: MDM
version: v1
Here is my issue :
✖ Swagger Error Not a valid parameter definition Jump to line 20 Details Object code: "ONE_OF_MISSING" params: Array [0] message: "Not a valid parameter definition" path: Array [5] 0: "paths" 1: "/currencies/{currencieId}" 2: "get" 3: "parameters" 4: "0" schemaId: " http://swagger.io/v2/schema.json# " inner: Array [2] level: 900 type: "Swagger Error" description: "Not a valid parameter definition" lineNumber: 20
I am a bit lost with that ....
Thanks for your help.
Julien
Remove allowMultiple: false
from the definition of the currencieId
parameter. That eliminates the error.
The allowMultiple
keyword does not exist in the OpenAPI (fka Swagger) Specification 2.0 . It was used in v1.2 , but in 2.0 it was replaced with type: array
and collectionFormat
.
allowMultiple:假不正确
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.