-
Notifications
You must be signed in to change notification settings - Fork 18
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 optional? #26
Comments
I'm down, especially since However, it DOES render the current homepage for httpbin. Maybe there's a way to fall back to the old static homepage if flasgger isn't available? |
I mean, I guess the way I'd address that would be just to make sure whatever process generates the project's homepage honors the optional dependency? I was thinking the setuptools e.g. in a lot of my projects I specify the dependency I don't know how you do this if you're not using setuptools, but I'd be surprised if other systems don't make it possible. |
oh, I think I'm misunderstanding - you mean it renders the page you see for any instance of httpbin if you just go to the root of the web server? In that case, yeah, I guess we'd need an alternative. |
As I understand it, yes, the neat API explorer thingy you get when visiting the homepage of httpbin.org is powered by flasgger. At one point there was a static html homepage, if someone dug that up from git history and made sure it was up-to-date with all the currently available endpoints and had the app fall back to that static page if flasgger is not installed, then I would merge that PR :) |
awesome, thanks. I will try and get to that then. |
Sorry for the delay, but I finally went ahead and did #32 . |
@sigmavirus24 @nateprewitt Could one of you please have a look at either PR #32 or #44 ? Pretty please? :) |
Hi! I'm a packager for Fedora. We've run into a bit of a roadblock trying to update Fedora's httpbin package: https://bugzilla.redhat.com/show_bug.cgi?id=2233128#c9
since the last version we packaged, httpbin grew a hard dependency on flasgger. flasgger is not packaged for Fedora and is a bit tricky to package because it contains several bundled, pre-minified javascript libraries, which is against Fedora's packaging guidelines. (They are also, I'll note, ancient - upstream hasn't updated the bundled libraries for ui2 or ui3 since it added them, six and five years ago respectively.)
We can probably work around this if necessary (perhaps by only packaging ui3, the one httpbin uses, which is simpler as it only bundles jquery 2.x), but another option is to look at having httpbin not use flasgger. It doesn't seem, strictly speaking, to be necessary - all it does (AIUI) is provide API docs in the web UI, which is neat but not critical. Especially not since the main reason we package httpbin in Fedora is as a dependency of requests' test suite - no human is looking at API docs in a web UI there.
Would it be acceptable to send a patch to make the flasgger dependency optional, and just skip all the flasgger setup stuff in
httpbin/core.py
if it's not present?The text was updated successfully, but these errors were encountered: