mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 03:47:02 +02:00
finish rebase and update utoipa to the latest version
This commit is contained in:
parent
742d0ee531
commit
13afdaf393
9 changed files with 34 additions and 27 deletions
|
@ -105,10 +105,10 @@ tracing-actix-web = "0.7.11"
|
|||
build-info = { version = "1.7.0", path = "../build-info" }
|
||||
roaring = "0.10.7"
|
||||
mopa-maintained = "0.2.3"
|
||||
utoipa = { version = "5.0.0-rc.0", features = ["actix_extras", "macros", "non_strict_integers", "preserve_order", "uuid", "time", "openapi_extensions"] }
|
||||
utoipa-scalar = { version = "0.2.0-rc.0", features = ["actix-web"] }
|
||||
utoipa-rapidoc = { version = "4.0.1-rc.0", features = ["actix-web"] }
|
||||
utoipa-redoc = { version = "4.0.1-rc.0", features = ["actix-web"] }
|
||||
utoipa = { version = "5.2.0", features = ["actix_extras", "macros", "non_strict_integers", "preserve_order", "uuid", "time", "openapi_extensions"] }
|
||||
utoipa-scalar = { version = "0.2.0", features = ["actix-web"] }
|
||||
utoipa-rapidoc = { version = "5.0.0", features = ["actix-web"] }
|
||||
utoipa-redoc = { version = "5.0.0", features = ["actix-web"] }
|
||||
|
||||
[dev-dependencies]
|
||||
actix-rt = "2.10.0"
|
||||
|
|
|
@ -74,7 +74,7 @@ async fn get_batches(
|
|||
let next = if results.len() == limit as usize { results.pop().map(|t| t.uid) } else { None };
|
||||
|
||||
let from = results.first().map(|t| t.uid);
|
||||
let tasks = AllBatches { results, limit: limit.saturating_sub(1), total, from, next };
|
||||
let tasks = AllBatches { results, limit: limit.saturating_sub(1) as u32, total, from, next };
|
||||
|
||||
Ok(HttpResponse::Ok().json(tasks))
|
||||
}
|
||||
|
|
|
@ -403,7 +403,6 @@ pub struct UpdateIndexRequest {
|
|||
)),
|
||||
)
|
||||
)]
|
||||
>>>>>>> 0f289a437 (Implements the get and delete tasks route):meilisearch/src/routes/indexes/mod.rs
|
||||
pub async fn update_index(
|
||||
index_scheduler: GuardedData<ActionPolicy<{ actions::INDEXES_UPDATE }>, Data<IndexScheduler>>,
|
||||
index_uid: web::Path<String>,
|
||||
|
|
|
@ -20,9 +20,7 @@ use tokio::task;
|
|||
use utoipa::{IntoParams, OpenApi, ToSchema};
|
||||
|
||||
use super::{get_task_id, is_dry_run, SummarizedTaskView, PAGINATION_DEFAULT_LIMIT};
|
||||
use crate::analytics::Analytics;
|
||||
use super::{get_task_id, is_dry_run, SummarizedTaskView};
|
||||
use crate::analytics::Analytics;
|
||||
use crate::analytics::{Aggregate, AggregateMethod, Analytics};
|
||||
use crate::extractors::authentication::policies::*;
|
||||
use crate::extractors::authentication::GuardedData;
|
||||
use crate::extractors::sequential_extractor::SeqHandler;
|
||||
|
@ -55,8 +53,8 @@ pub fn configure(cfg: &mut web::ServiceConfig) {
|
|||
#[into_params(rename_all = "camelCase", parameter_in = Query)]
|
||||
pub struct TasksFilterQuery {
|
||||
/// Maximum number of results to return.
|
||||
#[deserr(default = Param(DEFAULT_LIMIT), error = DeserrQueryParamError<InvalidTaskLimit>)]
|
||||
#[param(required = false, value_type = u32, example = 12, default = json!(DEFAULT_LIMIT))]
|
||||
#[deserr(default = Param(PAGINATION_DEFAULT_LIMIT as u32), error = DeserrQueryParamError<InvalidTaskLimit>)]
|
||||
#[param(required = false, value_type = u32, example = 12, default = json!(PAGINATION_DEFAULT_LIMIT))]
|
||||
pub limit: Param<u32>,
|
||||
/// Fetch the next set of results from the given uid.
|
||||
#[deserr(default, error = DeserrQueryParamError<InvalidTaskFrom>)]
|
||||
|
@ -66,6 +64,12 @@ pub struct TasksFilterQuery {
|
|||
#[deserr(default, error = DeserrQueryParamError<InvalidTaskReverse>)]
|
||||
#[param(required = false, value_type = Option<bool>, example = true)]
|
||||
pub reverse: Option<Param<bool>>,
|
||||
|
||||
/// Permits to filter tasks by their batch uid. By default, when the `batchUids` query parameter is not set, all task uids are returned. It's possible to specify several batch uids by separating them with the `,` character.
|
||||
#[deserr(default, error = DeserrQueryParamError<InvalidBatchUids>)]
|
||||
#[param(required = false, value_type = Option<BatchId>, example = 12421)]
|
||||
pub batch_uids: OptionStarOrList<BatchId>,
|
||||
|
||||
/// Permits to filter tasks by their uid. By default, when the uids query parameter is not set, all task uids are returned. It's possible to specify several uids by separating them with the `,` character.
|
||||
#[deserr(default, error = DeserrQueryParamError<InvalidTaskUids>)]
|
||||
#[param(required = false, value_type = Option<Vec<u32>>, example = json!([231, 423, 598, "*"]))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue