Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions utoipa-axum/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@ where
Self(router, self.1)
}

/// Pass through method for [`axum::Router<S>::has_routes`].
pub fn has_routes(&self) -> bool {
self.0.has_routes()
}

/// Pass through method for [`axum::Router<S>::route`].
pub fn route(self, path: &str, method_router: MethodRouter<S>) -> Self {
Self(self.0.route(path, method_router), self.1)
Expand Down
2 changes: 1 addition & 1 deletion utoipa-gen/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ impl HttpMethod {
.map_err(|error| {
let mut diagnostics = Diagnostics::with_span(ident.span(), error.to_string());
if name == "connect" {
diagnostics = diagnostics.note("HTTP method `CONNET` is not supported by OpenAPI spec <https://spec.openapis.org/oas/latest.html#path-item-object>");
diagnostics = diagnostics.note("HTTP method `CONNECT` is not supported by OpenAPI spec <https://spec.openapis.org/oas/latest.html#path-item-object>");
}

diagnostics
Expand Down