mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-05 20:26:31 +00:00
Make types Serialize and Deserialize for proxying
This commit is contained in:
@ -1195,7 +1195,7 @@ pub async fn delete_documents_batch(
|
|||||||
Ok(HttpResponse::Accepted().json(task))
|
Ok(HttpResponse::Accepted().json(task))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserr, ToSchema)]
|
#[derive(Debug, Deserr, ToSchema, Serialize)]
|
||||||
#[deserr(error = DeserrJsonError, rename_all = camelCase, deny_unknown_fields)]
|
#[deserr(error = DeserrJsonError, rename_all = camelCase, deny_unknown_fields)]
|
||||||
#[schema(rename_all = "camelCase")]
|
#[schema(rename_all = "camelCase")]
|
||||||
pub struct DocumentDeletionByFilter {
|
pub struct DocumentDeletionByFilter {
|
||||||
@ -1287,7 +1287,7 @@ pub async fn delete_documents_by_filter(
|
|||||||
Ok(HttpResponse::Accepted().json(task))
|
Ok(HttpResponse::Accepted().json(task))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserr, ToSchema)]
|
#[derive(Debug, Deserr, ToSchema, Serialize)]
|
||||||
#[deserr(error = DeserrJsonError, rename_all = camelCase, deny_unknown_fields)]
|
#[deserr(error = DeserrJsonError, rename_all = camelCase, deny_unknown_fields)]
|
||||||
pub struct DocumentEditionByFunction {
|
pub struct DocumentEditionByFunction {
|
||||||
/// A string containing a RHAI function.
|
/// A string containing a RHAI function.
|
||||||
|
@ -184,7 +184,7 @@ pub fn is_dry_run(req: &HttpRequest, opt: &Opt) -> Result<bool, ResponseError> {
|
|||||||
.is_some_and(|s| s.to_lowercase() == "true"))
|
.is_some_and(|s| s.to_lowercase() == "true"))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, ToSchema)]
|
#[derive(Debug, Serialize, Deserialize, ToSchema)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct SummarizedTaskView {
|
pub struct SummarizedTaskView {
|
||||||
/// The task unique identifier.
|
/// The task unique identifier.
|
||||||
@ -198,7 +198,10 @@ pub struct SummarizedTaskView {
|
|||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
kind: Kind,
|
kind: Kind,
|
||||||
/// The date on which the task was enqueued.
|
/// The date on which the task was enqueued.
|
||||||
#[serde(serialize_with = "time::serde::rfc3339::serialize")]
|
#[serde(
|
||||||
|
serialize_with = "time::serde::rfc3339::serialize",
|
||||||
|
deserialize_with = "time::serde::rfc3339::deserialize"
|
||||||
|
)]
|
||||||
enqueued_at: OffsetDateTime,
|
enqueued_at: OffsetDateTime,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user