slanatech / swagger-stats

API Observability. Trace API calls and Monitor API performance, health and usage statistics in Node.js Microservices.
https://swaggerstats.io/
MIT License
900 stars 139 forks source link

openapi3 basePath was removed #84

Closed psyren closed 4 years ago

psyren commented 4 years ago

Request are recognized as non-swagger, because basePath is not available in spec.

https://github.com/slanatech/swagger-stats/blob/master/lib/swsAPIStats.js swsAPIStats.prototype.initBasePath = function(swaggerSpec) { this.basePath = swaggerSpec.basePath ? swaggerSpec.basePath : '/';

Easy workaround add this parameter to configuration.

sv2 commented 4 years ago

Addressed in 0.95.16 - added option basePath to specify base path as needed when Openapi 3.0 spec is used.