Improve the documentation of the FacetSearchQuery struct

This commit is contained in:
Clément Renault 2023-06-29 10:28:23 +02:00
parent 605c1dd54a
commit 44b5b9e1a7
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -22,7 +22,9 @@ pub fn configure(cfg: &mut web::ServiceConfig) {
cfg.service(web::resource("").route(web::post().to(search))); cfg.service(web::resource("").route(web::post().to(search)));
} }
// TODO improve the error messages /// # Important
///
/// Intentionally don't use `deny_unknown_fields` to ignore search parameters sent by user
#[derive(Debug, Clone, Default, PartialEq, deserr::Deserr)] #[derive(Debug, Clone, Default, PartialEq, deserr::Deserr)]
#[deserr(error = DeserrJsonError, rename_all = camelCase)] #[deserr(error = DeserrJsonError, rename_all = camelCase)]
pub struct FacetSearchQuery { pub struct FacetSearchQuery {