I have an connexion.AsyncApp
in python. A snippet of the code looks like this:
app = AsyncApp(__name__)
app.add_api("openapi.yaml", arguments={"title": "Async APP API"})
if __name__ == "__main__":
uvicorn.run(app, host="127.0.0.1", port=8000)
I've been trying to determine how to access the route of an incoming request. I attempted to add middleware before SwaggerUIMiddleware
using self.app.add_middleware()
, assuming the route information would be available at that point. However, after inspecting the object received in the middleware, I couldn't find any member variables containing this information.
I sent a request to an endpoint similar to /greetings/{user}
but couldn't see the route with {user}
as a placeholder. Instead, I only saw the actual username.
Is there no easy way to find the route information with connexion async app?