Yelp / bravado-core

Other
109 stars 98 forks source link

Don't use Swagger spec path for API URL #295

Closed mulmschneider closed 6 years ago

mulmschneider commented 6 years ago

According to the Swagger spec we should not use the path part of the spec URL, but instead just use the host part of the URL (see the existing comment for build_api_serving_url, as well as https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#fixed-fields ).

Also update tests to match new behaviour.

I don't know if bravado users depend on the current behavior - feedback appreciated.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 98.445% when pulling 108363636068fc6b1234bad2a9139550e256af3a on mulmschneider:build_url_no_basepath into 947d7fc7de62c0347a7e14c6da5799c3a9bcf8e8 on Yelp:master.

mulmschneider commented 6 years ago

Not sure why the 'docs' part of the build failed - seems to be unrelated from this PR?

DStape commented 6 years ago

Hello, I've opened #299 because this change has caused some test failures for us, there's more detail in that thread, any feedback is appreciated, thanks.