apigee-127 / swagger-tools

A Node.js and browser module that provides tooling around Swagger.
MIT License
702 stars 371 forks source link

request/response body schema referenced in swagger is not getting validating #614

Open jagdishkumar1 opened 4 years ago

jagdishkumar1 commented 4 years ago

Describe the bug you're encountering

In the swagger definition, a request/response body schema is defined, but if I provide some invalid field name in request body, say xyz, swagger gives no error like invalid field or not part of defined schema etc

Expected behavior

Swagger should gives a error regarding invalid field in request/response body

Screeshot

Defined request body in swagger:

image

Tried out request with invalid field xyz:

image

Response is success, but expectation is it should fail as xyz is not part of request body:

image