Skip to content

sabbiu/openapi-demo-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published