hug icon indicating copy to clipboard operation
hug copied to clipboard

Documentation route appears to be broken

Open jay-tyler opened this issue 5 years ago • 5 comments

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.

jay-tyler avatar Feb 09 '20 22:02 jay-tyler

The simplest fix would be to return status 200 for the /documentation route.

But end users might want some additional functionality. This could include:

  1. Changing the documentation path, e.g. /docs etc
  2. Turning off documentation for status 404

jay-tyler avatar Feb 10 '20 22:02 jay-tyler

@jay-tyler I can pick this up, if you're not already working on this. 😄

Pradhvan avatar Feb 24 '20 18:02 Pradhvan

@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

jay-tyler avatar Feb 25 '20 01:02 jay-tyler

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 avatar Feb 25 '20 16:02 Pradhvan

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

mandarvaze avatar Oct 15 '20 13:10 mandarvaze