You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ curl -X GET localhost:3000/ping/a
{"name":"Internal Server Error","status":500,"path":"/ping/a","errors":[{"path":".response.pong","message":"should have required property 'pong'","errorCode":"required.openapi.validation"}]}⏎
So I would say it's not broken : as far as I know, it just follows the openapi standard 🥳
To make it more obvious, maybe the example spec should just be changed by adding these 2 props required and additionalProperties ?
Describe the bug
Invalid example for NestJS https://github.com/cdimascio/express-openapi-validator/tree/master/examples/9-nestjs
To Reproduce
Actual behavior
The response "{"pongInvalid":"123"}" returned without error.
Expected behavior
An error with an invalid response structure should be triggered.
Additional info
Also tried on a brand new NestJS version, same result.
System
node -v -> v18.16.0
nest -v -> 10.1.17
The text was updated successfully, but these errors were encountered: