httpbin
httpbin copied to clipboard
Make flasgger dep optional (#26)
As discussed in the ticket, the flasgger dep is a pretty heavy one which is not needed when using httpbin as a library. It's only really needed to produce the fancy homepage and API docs for httpbin.org.
This makes the dependency optional, and falls back to the old static HTML page for / if flasgger is not available. The flasgger dependency is moved from the main set of dependencies to the 'mainapp' extras (to ensure we do get the shiny new homepage when we want it).
I tested this by disabling the flasgger dep in pyproject.toml and building a container locally; it works as expected (falls back to the old static page as the front page).
Rebased.
ping? it would be nice not to have to carry this patch downstream any more...
LGTM!