REST API - Swagger - Don't understand why "Not a valid parameter definition" -
i face issue 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 issue :
✖ swagger error not valid parameter definition jump line 20 details object code: "one_of_missing" params: array [0] message: "not 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 valid parameter definition" linenumber: 20
i bit lost ....
thanks help.
julien
remove allowmultiple: false
definition of currencieid
parameter. eliminates error.
the allowmultiple
keyword not exist in openapi (fka swagger) specification 2.0. used in v1.2, in 2.0 replaced type: array
, collectionformat
.
Comments
Post a Comment