hug
hug copied to clipboard
Documentation route appears to be broken
Noticing on the quick start guide, for the happy_birthday.py
example, the localhost:8000/documentation
route appears to be broken (returning 404).
Perhaps I'm doing something wrong, but if not, we should fix the bug and/or the documentation. And maybe consider an integration test as part of our test suite to prevent a future regression.
The simplest fix would be to return status 200
for the /documentation
route.
But end users might want some additional functionality. This could include:
- Changing the documentation path, e.g.
/docs
etc - Turning off documentation for status
404
@jay-tyler I can pick this up, if you're not already working on this. 😄
@Pradhvan Thanks for the offer! Yes, feel free to.
I brought this up as a potential issue to work on for a PyCascades sprint, but we never quite decided what approach to take. There are a lot of little issues related to this. For instance
- What if someone want the
/documentation
route to be something different? e.g./docs
or/api
- What should we do for non-routes? Right now, any path like
/asdfae
will return the same stuff that/documentation
will. We could consider turning this 404 functionality on/off via configuration.
You're welcome to try to address either of these, although you might want to discuss it here first. But if you simply want to make a change such that /documentation
returns a status 200, that would be relatively straightforward and welcome
Hey! Since I am new to the whole hug codebase, let me first work my way through the problem of solving /documentation
returning status code 200.
While working on the issue if I do come up with the idea of solving the other two mentioned problem would definitely discuss it here.
@Pradhvan Another issue related to documentation is that in the examples
output, the port is missing - so when clicked - we get "Unable to connect"
Not 404 - cause the link tries to go to port 80 - default - not 8000 from the dev server.
@jay-tyler let me know if this should be a separate bug (Or expected behaviour, hence not a bug)