mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-01-09 13:04:30 +01:00
review all the parameters and tags
This commit is contained in:
parent
aab6ffec30
commit
5f55e88484
@ -208,7 +208,7 @@ pub async fn list_api_keys(
|
||||
/// Get an API key from its `uid` or its `key` field.
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/{key}",
|
||||
path = "/{uidOrKey}",
|
||||
tag = "Keys",
|
||||
security(("Bearer" = ["keys.get", "keys.*", "*"])),
|
||||
params(("uidOrKey" = String, Path, format = Password, example = "7b198a7f-52a0-4188-8762-9ad93cd608b2", description = "The `uid` or `key` field of an existing API key", nullable = false)),
|
||||
@ -275,7 +275,7 @@ pub async fn get_api_key(
|
||||
/// If there is an issue with the `key` or `uid` of a key, then you must recreate one from scratch.
|
||||
#[utoipa::path(
|
||||
patch,
|
||||
path = "/{key}",
|
||||
path = "/{uidOrKey}",
|
||||
tag = "Keys",
|
||||
security(("Bearer" = ["keys.update", "keys.*", "*"])),
|
||||
params(("uidOrKey" = String, Path, format = Password, example = "7b198a7f-52a0-4188-8762-9ad93cd608b2", description = "The `uid` or `key` field of an existing API key", nullable = false)),
|
||||
@ -345,7 +345,7 @@ pub async fn patch_api_key(
|
||||
/// If there is an issue with the `key` or `uid` of a key, then you must recreate one from scratch.
|
||||
#[utoipa::path(
|
||||
delete,
|
||||
path = "/{key}",
|
||||
path = "/{uidOrKey}",
|
||||
tag = "Keys",
|
||||
security(("Bearer" = ["keys.delete", "keys.*", "*"])),
|
||||
params(("uidOrKey" = String, Path, format = Password, example = "7b198a7f-52a0-4188-8762-9ad93cd608b2", description = "The `uid` or `key` field of an existing API key", nullable = false)),
|
||||
|
@ -177,12 +177,10 @@ impl Aggregate for FacetSearchAggregator {
|
||||
/// Search for a facet value within a given facet.
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/{indexUid}/facet-search",
|
||||
tags = ["Indexes", "Facet Search"],
|
||||
path = "{indexUid}/facet-search",
|
||||
tag = "Facet Search",
|
||||
security(("Bearer" = ["search", "*"])),
|
||||
params(
|
||||
("indexUid", example = "movies", description = "Index Unique Identifier", nullable = false),
|
||||
),
|
||||
params(("indexUid", example = "movies", description = "Index Unique Identifier", nullable = false)),
|
||||
request_body = FacetSearchQuery,
|
||||
responses(
|
||||
(status = 200, description = "The documents are returned", body = SearchResult, content_type = "application/json", example = json!(
|
||||
|
@ -110,7 +110,7 @@ impl IndexView {
|
||||
|
||||
#[derive(Deserr, Debug, Clone, Copy, IntoParams)]
|
||||
#[deserr(error = DeserrQueryParamError, rename_all = camelCase, deny_unknown_fields)]
|
||||
#[into_params(rename_all = "camelCase")]
|
||||
#[into_params(rename_all = "camelCase", parameter_in = Query)]
|
||||
pub struct ListIndexes {
|
||||
/// The number of indexes to skip before starting to retrieve anything
|
||||
#[param(value_type = Option<usize>, default, example = 100)]
|
||||
@ -515,7 +515,7 @@ impl From<index_scheduler::IndexStats> for IndexStats {
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/{indexUid}/stats",
|
||||
tags = ["Indexes", "Stats"],
|
||||
tag = "Stats",
|
||||
security(("Bearer" = ["stats.get", "stats.*", "*"])),
|
||||
params(("indexUid", example = "movies", description = "Index Unique Identifier", nullable = false)),
|
||||
responses(
|
||||
|
@ -85,8 +85,9 @@ macro_rules! make_setting_route {
|
||||
#[utoipa::path(
|
||||
delete,
|
||||
path = concat!("{indexUid}/settings", $route),
|
||||
tags = ["Indexes", "Settings"],
|
||||
tag = "Settings",
|
||||
security(("Bearer" = ["settings.update", "settings.*", "*"])),
|
||||
params(("indexUid", example = "movies", description = "Index Unique Identifier", nullable = false)),
|
||||
request_body = $type,
|
||||
responses(
|
||||
(status = 200, description = "Task successfully enqueued", body = SummarizedTaskView, content_type = "application/json", example = json!(
|
||||
@ -146,8 +147,9 @@ macro_rules! make_setting_route {
|
||||
#[utoipa::path(
|
||||
$update_verb,
|
||||
path = concat!("{indexUid}/settings", $route),
|
||||
tags = ["Indexes", "Settings"],
|
||||
tag = "Settings",
|
||||
security(("Bearer" = ["settings.update", "settings.*", "*"])),
|
||||
params(("indexUid", example = "movies", description = "Index Unique Identifier", nullable = false)),
|
||||
request_body = $type,
|
||||
responses(
|
||||
(status = 200, description = "Task successfully enqueued", body = SummarizedTaskView, content_type = "application/json", example = json!(
|
||||
@ -229,8 +231,9 @@ macro_rules! make_setting_route {
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = concat!("{indexUid}/settings", $route),
|
||||
tags = ["Indexes", "Settings"],
|
||||
tag = "Settings",
|
||||
security(("Bearer" = ["settings.get", "settings.*", "*"])),
|
||||
params(("indexUid", example = "movies", description = "Index Unique Identifier", nullable = false)),
|
||||
request_body = $type,
|
||||
responses(
|
||||
(status = 200, description = concat!($camelcase_attr, " is returned"), body = SummarizedTaskView, content_type = "application/json", example = json!(
|
||||
@ -500,8 +503,9 @@ make_setting_routes!(
|
||||
#[utoipa::path(
|
||||
patch,
|
||||
path = "{indexUid}/settings",
|
||||
tags = ["Indexes", "Settings"],
|
||||
tag = "Settings",
|
||||
security(("Bearer" = ["settings.update", "settings.*", "*"])),
|
||||
params(("indexUid", example = "movies", description = "Index Unique Identifier", nullable = false)),
|
||||
request_body = Settings<Unchecked>,
|
||||
responses(
|
||||
(status = 200, description = "Task successfully enqueued", body = SummarizedTaskView, content_type = "application/json", example = json!(
|
||||
@ -609,8 +613,9 @@ pub async fn update_all(
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "{indexUid}/settings",
|
||||
tags = ["Indexes", "Settings"],
|
||||
tag = "Settings",
|
||||
security(("Bearer" = ["settings.update", "settings.*", "*"])),
|
||||
params(("indexUid", example = "movies", description = "Index Unique Identifier", nullable = false)),
|
||||
responses(
|
||||
(status = 200, description = "Settings are returned", body = Settings<Unchecked>, content_type = "application/json", example = json!(
|
||||
Settings::<Unchecked>::default()
|
||||
@ -644,8 +649,9 @@ pub async fn get_all(
|
||||
#[utoipa::path(
|
||||
delete,
|
||||
path = "{indexUid}/settings",
|
||||
tags = ["Indexes", "Settings"],
|
||||
tag = "Settings",
|
||||
security(("Bearer" = ["settings.update", "settings.*", "*"])),
|
||||
params(("indexUid", example = "movies", description = "Index Unique Identifier", nullable = false)),
|
||||
responses(
|
||||
(status = 200, description = "Task successfully enqueued", body = SummarizedTaskView, content_type = "application/json", example = json!(
|
||||
{
|
||||
|
@ -51,8 +51,8 @@ pub fn configure(cfg: &mut web::ServiceConfig) {
|
||||
/// Retrieve documents similar to a specific search result.
|
||||
#[utoipa::path(
|
||||
get,
|
||||
path = "/{indexUid}/similar",
|
||||
tags = ["Indexes", "Similar documents"],
|
||||
path = "{indexUid}/similar",
|
||||
tag = "Similar documents",
|
||||
security(("Bearer" = ["search", "*"])),
|
||||
params(
|
||||
("indexUid" = String, Path, example = "movies", description = "Index Unique Identifier", nullable = false),
|
||||
@ -135,12 +135,10 @@ pub async fn similar_get(
|
||||
/// Retrieve documents similar to a specific search result.
|
||||
#[utoipa::path(
|
||||
post,
|
||||
path = "/{indexUid}/similar",
|
||||
tags = ["Indexes", "Similar documents"],
|
||||
path = "{indexUid}/similar",
|
||||
tag = "Similar documents",
|
||||
security(("Bearer" = ["search", "*"])),
|
||||
params(
|
||||
("indexUid" = String, Path, example = "movies", description = "Index Unique Identifier", nullable = false),
|
||||
),
|
||||
params(("indexUid" = String, Path, example = "movies", description = "Index Unique Identifier", nullable = false)),
|
||||
request_body = SimilarQuery,
|
||||
responses(
|
||||
(status = 200, description = "The documents are returned", body = SimilarResult, content_type = "application/json", example = json!(
|
||||
|
Loading…
x
Reference in New Issue
Block a user