PayU / openapi-validator-middleware

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

Validation fails on Swaggers without basePath #11

Closed igor-savin-ht closed 6 years ago

igor-savin-ht commented 6 years ago

middleware.js:

let parsedPath = dereferenced.basePath !== '/' ? dereferenced.basePath.concat(currentPath.replace(/{/g, ':').replace(/}/g, '')) : currentPath.replace(/{/g, ':').replace(/}/g, '');

This will fail if no basePath is specified in Swagger.

idanto commented 6 years ago

Thanks @igor-savin-ht , fixed in v.0.3.3