Closed fly50789 closed 1 year ago
@fly50789 This is a dupe of #523
Due to how flask-restx
builds paths inside api
, if root (/
) is not already registered when you create your API, it creates it either to serve the doc or simply returns a 404 if you specify the doc path as in your example. Unfortunately, there is no easy fix to change the flask-restx
internal behaviour because of the flexibility flask gives users in registering endpoints.
To fix, simply define the /
route before you create your API object (move it above API in your code above) and it should work as expected.
It's on my to-do list to update the docs to make this clearer!
Thanks for your help~
I cant see root(eq.'/') page of blueprint unless I remove Api. But no matter what I can see '/other' page Is any suggestion?