flask-restx
flask-restx copied to clipboard
TODO Sample (todo_blueprint.py) is not working
Code
https://github.com/python-restx/flask-restx/blob/master/examples/todo_blueprint.py
Repro Steps (if applicable)
- Run this code
- Get into 127.0.0.1:5000
- Get 404 Error
Expected Behavior
I ran this code, but I can't see the swagger screen, I just get a 404 error. Can I fix it?
Environment
- Python version 3.10
- Flask version 3.0.3
- Flask-RESTX version 1.3.0
- Other installed Flask extensions
Im not near a computer right now to check but from memory the docs are served by default from the root of the API definition, not the global root route.
So you need to go to 127.0.0.1:5000/api/1 because that is the url the blueprint is set to use for the API in that example. If you want to serve it from /, remove the url prefix from the blueprint definition.
Message ID: @.***>
Oh Thank you!