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
Is your feature request related to a problem? Please describe.
Describe the solution you'd like QueryParam 支持 struct 传参并且能够在openapi中能够正常显示对应的字段属性
Describe alternatives you've considered
还是说只能如 example-oapi-todos 中的list示例一样列举出所有字段
pub async fn list_todos(offset: QueryParam<usize, false>, limit: QueryParam<usize, false>) -> Json<Vec<Todo>> { }
Additional context
The text was updated successfully, but these errors were encountered:
还有个问题在 #168 ,提供的代码在salvo更新至 0.64 版本无法正常使用。
0.64
Sorry, something went wrong.
可以使用 ToParameters, 把所有的参数集合起来存放在一个或者多个 struct 中,比如:
ToParameters
#[derive(ToParameters, serde::Deserialize)] #[salvo(parameters(default_parameter_in = Query))] struct Filter { #[salvo(parameter(value_type = Id))] id: String #[salvo(parameter(max_length = 10, min_length = 5, pattern = "[a-z]*"))] value: String, }
No branches or pull requests
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
QueryParam 支持 struct 传参并且能够在openapi中能够正常显示对应的字段属性
Describe alternatives you've considered
还是说只能如 example-oapi-todos 中的list示例一样列举出所有字段
Additional context
The text was updated successfully, but these errors were encountered: