psf / httpbin

HTTP Request & Response Service, written in Python + Flask.
https://httpbin.org
Other
54 stars 17 forks source link

Support using httpbin without flasgger #44

Open mgorny opened 10 months ago

mgorny commented 10 months ago

Make the dependency on flasgger optional. The dependency has been added relatively recently (i.e. before the original package was abandoned but after its last release), and it is only used to provide a more dynamic landing page. This is unnecessary for use of httpbin for testing, and it introduces an indirect dependency on Rust that is problematic.

With this change, flasgger is no longer installed by default. It can be enabled via "[flasgger]" extra. When flasgger is not available, httpbin redirects to the "legacy" index page.

mgorny commented 9 months ago

Hmm, 302 response for / breaks the test suite of httpcore. I'm going to change this later today to instead serve the old index without the redirect.

ml31415 commented 7 months ago

Seems to be a duplicate of #32 . But either way, would be great to see flasgger removed as dependency.