PayU / openapi-validator-middleware

Input validation using Swagger (Open API) and ajv
Apache License 2.0
144 stars 50 forks source link

[BUG] - OpenAPI 3.0 - fix mandatory validation for get body #43

Closed omer182 closed 5 years ago

omer182 commented 5 years ago

Every GET request in openAPI 3 is being validated for its requestBody. therefore the validator fails when trying to validate the requestBody of a get request which is undefined.\

line failing: const bodySchemaV3 = dereferenced.paths[currentPath][currentMethod].requestBody.content['application/json'].schema;

idanto commented 5 years ago

resolved #44