This example demonstrates how to use express-openapi-validator
with NestJS.
From this 9-nestjs
directory, run:
npm ci
npm run start
or
npm run start:dev
npm run build
npm run start:prod
curl --request GET --url http://localhost:3000/ping/foo
curl --request POST \
--url http://localhost:3000/ping \
--header 'Content-Type: application/json' \
--data '{"ping": "GNU Terry Pratchett"}'
validation error
curl --request POST \
--url http://localhost:3000/ping \
--header 'Content-Type: application/json' \
--data '{"pingoo": "GNU Terry Pratchett"}'|jq
npm run test