PayU / openapi-validator-middleware

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

Endpoint that do not have any parameters fail with an error #5

Closed kibertoad closed 6 years ago

kibertoad commented 6 years ago

let bodySchema = dereferenced.paths[currentPath][currentMethod].parameters.filter(function (parameter) { return parameter.in === 'body' });

This line predictably fails if parameters are null or undefined, which is a valid case.

kibertoad commented 6 years ago

@idanto Thanks for lightning-fast review and merge! Any estimate on when it is feasible to publish 0.3.1 with the fix?

idanto commented 6 years ago

already done :) enjoy

igor-savin-ht commented 6 years ago

Thanks a lot!