Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 1007 Bytes

README.md

File metadata and controls

58 lines (40 loc) · 1007 Bytes

example

simple example using express-openapi-validator

Install

npm i

Run

From this directory, run:

npm start

or run

npm run dev

Issue

This issue is now fixed in v4.4.2+

When I add this in query and run, it gives error

Ref: stackoverflow comment

- 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"}