We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I couldn't find a way to mark an endpoint as deprecated with Aide.
For example, Utoipa (which uses macros to generate documentation), makes use of Rust’s #[deprecated] attribute (https://docs.rs/utoipa/latest/utoipa/attr.path.html).
#[deprecated]
A deprecated endpoint should look like this (in Swagger):
Here is its raw OpenAPI JSON (simplified):
"/some/deprecated/route": { "get": { "summary": "Guys, don't use this endpoint anymore.", "deprecated": true } }
Aide could use the following syntax for this feature:
ApiRouter::new() .api_route( "/path/to/route", get_with(handler, |o| o.deprecated()), )
The text was updated successfully, but these errors were encountered:
Should not be hard to add this. I was wondering if there's a better syntax
Sorry, something went wrong.
The only alternative I can imagine is also accepting a boolean parameter:
.api_route( "/path/to/route", get_with(handler, |o| o.deprecated(true)), )
But to think of it, who would pass .deprecated(false)? 😁
.deprecated(false)
I think this is currently possible using o.inner_mut().deprecated = true;.
o.inner_mut().deprecated = true;
No branches or pull requests
I couldn't find a way to mark an endpoint as deprecated with Aide.
For example, Utoipa (which uses macros to generate documentation), makes use of Rust’s
#[deprecated]
attribute (https://docs.rs/utoipa/latest/utoipa/attr.path.html).A deprecated endpoint should look like this (in Swagger):
Here is its raw OpenAPI JSON (simplified):
Aide could use the following syntax for this feature:
The text was updated successfully, but these errors were encountered: