Hi,
We got an issue when we declare this 2 routes in this order into the app.py
:
@app.get("/v1/<id:string>/<obj:str>")
async def get_one_object(request, id):
...
@app.get("/v1/<id:string>/objects")
async def get_objects(request, id):
...
In this case, if we call the route /v1/my_id/objects
, the request goes into the method get_one_object()
and not get_objects()
If we change the order of the two methods in the python file, everything works fine.
But I don’t see any information about the importance of the declaration order in the Sanic’s documentation.
Thank you for your help,