flask-restful-swagger icon indicating copy to clipboard operation
flask-restful-swagger copied to clipboard

Requesting /docs gives 404 in examples

Open jordansamuels opened this issue 11 years ago • 1 comments

It appear that commit 82f4ff94a3e0b7bda880d4d6cff04e242f58cc82 broke /docs in the examples, because the path to static/ is no longer valid (since it's in a parent directory).

Repro:

  1. Clone 82f4ff94a3e0b7bda880d4d6cff04e242f58cc82

  2. Run the example

    $ PYTHONPATH=. python examples/basic.py

  3. /docs successfully redirects

    $ curl --head http://localhost:5000/docs HTTP/1.0 302 FOUND Content-Type: text/html; charset=utf-8 Content-Length: 241 Location: http://localhost:5000/static/docs.html Server: Werkzeug/0.9.6 Python/2.7.5 Date: Mon, 14 Jul 2014 15:08:32 GMT

  4. /static/docs.html not found:

    $ curl --head http://localhost:5000/static/docs.html HTTP/1.0 404 NOT FOUND Content-Type: text/html Content-Length: 233 Server: Werkzeug/0.9.6 Python/2.7.5 Date: Mon, 14 Jul 2014 15:08:36 GMT

One simple way to fix this is to add a symlink to ..\static in the examples directory. I will issue a pull request for this, but I'm happy for someone else to fix it a different way.

jordansamuels avatar Jul 14 '14 15:07 jordansamuels

Thanks, fixed https://github.com/rantav/flask-restful-swagger/commit/d5bcd57102811da0328ee0a16d7c481c5e559f02

rantav avatar Jul 15 '14 05:07 rantav