Forum Discussion

navot's avatar
navot
New Member
3 months ago

path param as a list with comma separator

Hi for some reason I can't create a schema with path param list with comma separator and enum that defines the allowed values. what am I doing wrong?

 

the structure of the url in the schema is:

/locations/{layers}/{z}/{x}/{y}

this is my url example below

http://localhost:3000/locations/points,linestrings/3/2/2?name=us

when Im passing that url Im getting enum not allowed values error

this is the path params schema below:

getTilesLocations:
summary: Gets locations tiles by x y z of with specific layers
parameters:
- name: layers
in: path
description: Types of locations layers(points, polygons, linestrings, clusters)
required: true
schema:
type: string
enum: [ 'points', 'polygons', 'linestrings', 'clusters' ]
style: simple
explode: true
- name: z
in: path
description: Z coordinate
required: true
schema:
type: number
- name: x
in: path
description: X coordinate
required: true
schema:
type: number
- name: y
in: path
description: Y coordinate
required: true
schema:
type: number

 

 

this is the package version im using

"openapi-validator-middleware": "^3.2.2"

 

any suggestion what am I doing wrong? thanks!

No RepliesBe the first to reply