add the searches route and fix a few broken things

This commit is contained in:
Tamo 2024-12-23 15:58:52 +01:00
parent 78f6f22a80
commit 04e4586fb3
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
8 changed files with 196 additions and 43 deletions

View file

@ -16,7 +16,6 @@ use std::ops::Deref;
use std::str::FromStr;
use deserr::{DeserializeError, Deserr, MergeWithError, ValueKind};
use utoipa::{PartialSchema, ToSchema};
use super::{DeserrParseBoolError, DeserrParseIntError};
use crate::index_uid::IndexUid;
@ -30,18 +29,6 @@ use crate::tasks::{Kind, Status};
#[derive(Default, Debug, Clone, Copy)]
pub struct Param<T>(pub T);
impl<T: ToSchema> ToSchema for Param<T> {
fn name() -> std::borrow::Cow<'static, str> {
T::name()
}
}
impl<T: PartialSchema> PartialSchema for Param<T> {
fn schema() -> utoipa::openapi::RefOr<utoipa::openapi::schema::Schema> {
T::schema()
}
}
impl<T> Deref for Param<T> {
type Target = T;

View file

@ -6,7 +6,7 @@ use std::str::FromStr;
use deserr::{DeserializeError, Deserr, MergeWithError, ValueKind};
use serde::de::Visitor;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use utoipa::{IntoParams, PartialSchema, ToSchema};
use utoipa::PartialSchema;
use crate::deserr::query_params::FromQueryParameter;