redskap / swagger-brake

Swagger contract checker for breaking API changes
Apache License 2.0
58 stars 16 forks source link

Path comparison does not factor in basePath #13

Closed dalewking closed 5 years ago

dalewking commented 5 years ago

Let's say that I start with an old API that does not set the baseBath and has a path like /api/v1/foo

If in a new API I set the basePath to /bar swagger brake does not see that as a breaking change even though I have now changed all the paths.

Conversely, if I factor out a common prefix to basePath by setting basePath to /api/v1 and changing the path to foo then swagger brake reports that as a breaking change even though none of the routes changed.

dalewking commented 5 years ago

Doh! Never mind. basePath was from Swagger 2.0 and isn't in OpenAPI