Replies: 1 comment 3 replies
-
This is quite hard problem to solve. Like I don't know a way to expose the path and request method from router or route function. Or the other way around how to generate a router or how to provide correct route definition from From After all this is something that could be really considered for inclusion to the library but is is axum specific functionality. This could experimented whether it would be possible in reasonable manner. And of course ideas related to the spec regarding how it should be implemented and what should be generated is appreciated. |
Beta Was this translation helpful? Give feedback.
-
We started to build our public API with
axum
andutoipa
and are already facing the issue that we discover miss matches between the API spec and the actual implementation in axum.Examples for this are,
route
path does not matchutoipa
path or method does not matchutoipa
path. For this reason, I started looking into what is being generated for the OpenAPI spec and how we could use that to avoid the drift between implementation and documentation.What I found is quite nice, we can access the entire APS spec and extract all paths and methods from it to build our router. I discovered only two issues that block us from doing this, though:
Beta Was this translation helpful? Give feedback.
All reactions