-
Hi. I am porting this code from plain Poem to Poem-OpenApi. let app = Route::new()
.at("/foo/*path", get(routes::risetai).post(routes::risetai).delete(routes::risetai)) #[OpenApi]
impl ProxyHandler {
#[oai(path = "/foo/*path", method = "get")]
pub async fn proxy(
&self, How to use multiple HTTP methods in one single endpoint? #[OpenApi]
impl ProxyHandler {
- #[oai(path = "/foo/*path", method = "get")]
+ #[oai(path = "/foo/*path", methods = ["get", "post", "delete")]
pub async fn proxy(
&self, I can't find one single endpoint used by many HTTP methods in examples:
Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Specifying multiple methods for the same endpoint is not yet supported, I can add it. Also, the OpenAPI specification does not support wildcard path matching, so |
Beta Was this translation helpful? Give feedback.
-
Any news on this? I am looking for this feature and it seems still not yet supported. |
Beta Was this translation helpful? Give feedback.
Specifying multiple methods for the same endpoint is not yet supported, I can add it.
Also, the OpenAPI specification does not support wildcard path matching, so
Poem-openapi
does not support it either.