Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make flasgger dep optional (#26) #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AdamWill
Copy link

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).

@AdamWill
Copy link
Author

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).

@AdamWill
Copy link
Author

Rebased.

@AdamWill
Copy link
Author

ping? it would be nice not to have to carry this patch downstream any more...

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).

Signed-off-by: Adam Williamson <[email protected]>
@ml31415
Copy link

ml31415 commented Apr 10, 2024

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants