1
votes

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

Issue in swagger editor

I am a bit lost with that ....

Thanks for your help.

Julien

2

2 Answers

2
votes

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.

0
votes

allowMultiple: false is not correct