simple example using express-openapi-validator
npm i
From this directory, run:
npm start
or run
npm run dev
This issue is now fixed in
v4.4.2+
When I add this in query and run, it gives error
- name: params
in: query
required: false
schema:
type: object
# If the parameter values are of specific type, e.g. string:
# additionalProperties:
# type: string
# If the parameter values can be of different types
# (e.g. string, number, boolean, ...)
additionalProperties: true
# `style: form` and `explode: true` is the default serialization method
# for query parameters, so these keywords can be omitted
style: form
explode: true
$ curl http://localhost:3000/v1/pets\?type\=dog\&limit\=10\&test\=query
# returns {"message":"Cannot convert undefined or null to object"}