diff --git a/dump/src/reader/compat/v5_to_v6.rs b/dump/src/reader/compat/v5_to_v6.rs index 8d345be45..6d1e698b3 100644 --- a/dump/src/reader/compat/v5_to_v6.rs +++ b/dump/src/reader/compat/v5_to_v6.rs @@ -439,7 +439,7 @@ pub(crate) mod test { // tasks let tasks = dump.tasks().unwrap().collect::>>().unwrap(); let (tasks, update_files): (Vec<_>, Vec<_>) = tasks.into_iter().unzip(); - meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"10c673c97f053830aa659876d7aa0b53"); + meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"41f91d3a94911b2735ec41b07540df5c"); assert_eq!(update_files.len(), 22); assert!(update_files[0].is_none()); // the dump creation assert!(update_files[1].is_some()); // the enqueued document addition diff --git a/dump/src/reader/mod.rs b/dump/src/reader/mod.rs index 259c9ce53..cf671ea45 100644 --- a/dump/src/reader/mod.rs +++ b/dump/src/reader/mod.rs @@ -201,7 +201,7 @@ pub(crate) mod test { // tasks let tasks = dump.tasks().unwrap().collect::>>().unwrap(); let (tasks, update_files): (Vec<_>, Vec<_>) = tasks.into_iter().unzip(); - meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"10c673c97f053830aa659876d7aa0b53"); + meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"41f91d3a94911b2735ec41b07540df5c"); assert_eq!(update_files.len(), 22); assert!(update_files[0].is_none()); // the dump creation assert!(update_files[1].is_some()); // the enqueued document addition @@ -279,7 +279,7 @@ pub(crate) mod test { // tasks let tasks = dump.tasks().unwrap().collect::>>().unwrap(); let (tasks, update_files): (Vec<_>, Vec<_>) = tasks.into_iter().unzip(); - meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"12eca43d5d1e1f334200eb4df653b0c9"); + meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"c2445ddd1785528b80f2ba534d3bd00c"); assert_eq!(update_files.len(), 10); assert!(update_files[0].is_some()); // the enqueued document addition assert!(update_files[1..].iter().all(|u| u.is_none())); // everything already processed @@ -356,7 +356,7 @@ pub(crate) mod test { // tasks let tasks = dump.tasks().unwrap().collect::>>().unwrap(); let (tasks, update_files): (Vec<_>, Vec<_>) = tasks.into_iter().unzip(); - meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"2f51c6345fabccf47b18c82bad618ffe"); + meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"cd12efd308fe3ed226356a727ab42ed3"); assert_eq!(update_files.len(), 10); assert!(update_files[0].is_some()); // the enqueued document addition assert!(update_files[1..].iter().all(|u| u.is_none())); // everything already processed @@ -449,7 +449,7 @@ pub(crate) mod test { // tasks let tasks = dump.tasks().unwrap().collect::>>().unwrap(); let (tasks, update_files): (Vec<_>, Vec<_>) = tasks.into_iter().unzip(); - meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"b27292d0bb86d4b4dd1b375a46b33890"); + meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"bc616290adfe7d09a624cf6065ca9069"); assert_eq!(update_files.len(), 9); assert!(update_files[0].is_some()); // the enqueued document addition assert!(update_files[1..].iter().all(|u| u.is_none())); // everything already processed @@ -542,7 +542,7 @@ pub(crate) mod test { // tasks let tasks = dump.tasks().unwrap().collect::>>().unwrap(); let (tasks, update_files): (Vec<_>, Vec<_>) = tasks.into_iter().unzip(); - meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"9725ccfceea3f8d5846c44006c9e1e7b"); + meili_snap::snapshot_hash!(meili_snap::json_string!(tasks), @"b3e3652bfc10a76670be157d2507d761"); assert_eq!(update_files.len(), 9); assert!(update_files[..].iter().all(|u| u.is_none())); // no update file in dump v1 diff --git a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap index 3e95c5b25..fd9790835 100644 --- a/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap +++ b/index-scheduler/src/snapshots/lib.rs/swap_indexes_errors/first_swap_failed.snap @@ -10,7 +10,7 @@ source: index-scheduler/src/lib.rs 1 {uid: 1, status: succeeded, details: { primary_key: Some("id") }, kind: IndexCreation { index_uid: "b", primary_key: Some("id") }} 2 {uid: 2, status: succeeded, details: { primary_key: Some("id") }, kind: IndexCreation { index_uid: "c", primary_key: Some("id") }} 3 {uid: 3, status: succeeded, details: { primary_key: Some("id") }, kind: IndexCreation { index_uid: "d", primary_key: Some("id") }} -4 {uid: 4, status: failed, error: ResponseError { code: 200, message: "Indexes `e`, `f` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { swaps: [IndexSwap { indexes: ("a", "b") }, IndexSwap { indexes: ("c", "e") }, IndexSwap { indexes: ("d", "f") }] }, kind: IndexSwap { swaps: [IndexSwap { indexes: ("a", "b") }, IndexSwap { indexes: ("c", "e") }, IndexSwap { indexes: ("d", "f") }] }} +4 {uid: 4, status: failed, error: ResponseError { code: 200, message: "Indexes `e`, `f` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { swaps: [IndexSwap { indexes: ("a", "b") }, IndexSwap { indexes: ("c", "e") }, IndexSwap { indexes: ("d", "f") }] }, kind: IndexSwap { swaps: [IndexSwap { indexes: ("a", "b") }, IndexSwap { indexes: ("c", "e") }, IndexSwap { indexes: ("d", "f") }] }} ---------------------------------------------------------------------- ### Status: enqueued [] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_processing_the_10_tasks.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_processing_the_10_tasks.snap index 59e7a4509..ed28c121b 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_processing_the_10_tasks.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index/after_processing_the_10_tasks.snap @@ -6,16 +6,16 @@ source: index-scheduler/src/lib.rs [] ---------------------------------------------------------------------- ### All Tasks: -0 {uid: 0, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000000, documents_count: 1, allow_index_creation: false }} -1 {uid: 1, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000001, documents_count: 1, allow_index_creation: false }} -2 {uid: 2, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000002, documents_count: 1, allow_index_creation: false }} -3 {uid: 3, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000003, documents_count: 1, allow_index_creation: false }} -4 {uid: 4, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000004, documents_count: 1, allow_index_creation: false }} -5 {uid: 5, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000005, documents_count: 1, allow_index_creation: false }} -6 {uid: 6, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000006, documents_count: 1, allow_index_creation: false }} -7 {uid: 7, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000007, documents_count: 1, allow_index_creation: false }} -8 {uid: 8, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000008, documents_count: 1, allow_index_creation: false }} -9 {uid: 9, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000009, documents_count: 1, allow_index_creation: false }} +0 {uid: 0, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000000, documents_count: 1, allow_index_creation: false }} +1 {uid: 1, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000001, documents_count: 1, allow_index_creation: false }} +2 {uid: 2, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000002, documents_count: 1, allow_index_creation: false }} +3 {uid: 3, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000003, documents_count: 1, allow_index_creation: false }} +4 {uid: 4, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000004, documents_count: 1, allow_index_creation: false }} +5 {uid: 5, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000005, documents_count: 1, allow_index_creation: false }} +6 {uid: 6, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000006, documents_count: 1, allow_index_creation: false }} +7 {uid: 7, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000007, documents_count: 1, allow_index_creation: false }} +8 {uid: 8, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000008, documents_count: 1, allow_index_creation: false }} +9 {uid: 9, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000009, documents_count: 1, allow_index_creation: false }} ---------------------------------------------------------------------- ### Status: enqueued [] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/all_tasks_processed.snap index 05da8f83b..d995cab9e 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/all_tasks_processed.snap @@ -6,16 +6,16 @@ source: index-scheduler/src/lib.rs [] ---------------------------------------------------------------------- ### All Tasks: -0 {uid: 0, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000000, documents_count: 1, allow_index_creation: false }} -1 {uid: 1, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000001, documents_count: 1, allow_index_creation: false }} -2 {uid: 2, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000002, documents_count: 1, allow_index_creation: false }} -3 {uid: 3, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000003, documents_count: 1, allow_index_creation: false }} -4 {uid: 4, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000004, documents_count: 1, allow_index_creation: false }} -5 {uid: 5, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000005, documents_count: 1, allow_index_creation: false }} -6 {uid: 6, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000006, documents_count: 1, allow_index_creation: false }} -7 {uid: 7, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000007, documents_count: 1, allow_index_creation: false }} -8 {uid: 8, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000008, documents_count: 1, allow_index_creation: false }} -9 {uid: 9, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000009, documents_count: 1, allow_index_creation: false }} +0 {uid: 0, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000000, documents_count: 1, allow_index_creation: false }} +1 {uid: 1, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000001, documents_count: 1, allow_index_creation: false }} +2 {uid: 2, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000002, documents_count: 1, allow_index_creation: false }} +3 {uid: 3, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000003, documents_count: 1, allow_index_creation: false }} +4 {uid: 4, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000004, documents_count: 1, allow_index_creation: false }} +5 {uid: 5, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000005, documents_count: 1, allow_index_creation: false }} +6 {uid: 6, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000006, documents_count: 1, allow_index_creation: false }} +7 {uid: 7, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000007, documents_count: 1, allow_index_creation: false }} +8 {uid: 8, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000008, documents_count: 1, allow_index_creation: false }} +9 {uid: 9, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000009, documents_count: 1, allow_index_creation: false }} ---------------------------------------------------------------------- ### Status: enqueued [] diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/five_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/five_tasks_processed.snap index 3c33a3f57..3ae875bff 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/five_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_cant_create_index_without_index_without_autobatching/five_tasks_processed.snap @@ -6,11 +6,11 @@ source: index-scheduler/src/lib.rs [] ---------------------------------------------------------------------- ### All Tasks: -0 {uid: 0, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000000, documents_count: 1, allow_index_creation: false }} -1 {uid: 1, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000001, documents_count: 1, allow_index_creation: false }} -2 {uid: 2, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000002, documents_count: 1, allow_index_creation: false }} -3 {uid: 3, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000003, documents_count: 1, allow_index_creation: false }} -4 {uid: 4, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000004, documents_count: 1, allow_index_creation: false }} +0 {uid: 0, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000000, documents_count: 1, allow_index_creation: false }} +1 {uid: 1, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000001, documents_count: 1, allow_index_creation: false }} +2 {uid: 2, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000002, documents_count: 1, allow_index_creation: false }} +3 {uid: 3, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000003, documents_count: 1, allow_index_creation: false }} +4 {uid: 4, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000004, documents_count: 1, allow_index_creation: false }} 5 {uid: 5, status: enqueued, details: { received_documents: 1, indexed_documents: None }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000005, documents_count: 1, allow_index_creation: false }} 6 {uid: 6, status: enqueued, details: { received_documents: 1, indexed_documents: None }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000006, documents_count: 1, allow_index_creation: false }} 7 {uid: 7, status: enqueued, details: { received_documents: 1, indexed_documents: None }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000007, documents_count: 1, allow_index_creation: false }} diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/all_tasks_processed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/all_tasks_processed.snap index d2ebddf08..19ee47359 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/all_tasks_processed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/all_tasks_processed.snap @@ -6,7 +6,7 @@ source: index-scheduler/src/lib.rs [] ---------------------------------------------------------------------- ### All Tasks: -0 {uid: 0, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000000, documents_count: 1, allow_index_creation: false }} +0 {uid: 0, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000000, documents_count: 1, allow_index_creation: false }} 1 {uid: 1, status: succeeded, details: { received_documents: 1, indexed_documents: Some(1) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000001, documents_count: 1, allow_index_creation: true }} 2 {uid: 2, status: succeeded, details: { received_documents: 1, indexed_documents: Some(1) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000002, documents_count: 1, allow_index_creation: false }} 3 {uid: 3, status: succeeded, details: { received_documents: 1, indexed_documents: Some(1) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000003, documents_count: 1, allow_index_creation: true }} diff --git a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/only_first_task_failed.snap b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/only_first_task_failed.snap index 00edf1ef7..ed57bc4e3 100644 --- a/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/only_first_task_failed.snap +++ b/index-scheduler/src/snapshots/lib.rs/test_document_addition_mixed_right_without_index_starts_with_cant_create/only_first_task_failed.snap @@ -6,7 +6,7 @@ source: index-scheduler/src/lib.rs [] ---------------------------------------------------------------------- ### All Tasks: -0 {uid: 0, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index-not-found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000000, documents_count: 1, allow_index_creation: false }} +0 {uid: 0, status: failed, error: ResponseError { code: 200, message: "Index `doggos` not found.", error_code: "index_not_found", error_type: "invalid_request", error_link: "https://docs.meilisearch.com/errors#index_not_found" }, details: { received_documents: 1, indexed_documents: Some(0) }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000000, documents_count: 1, allow_index_creation: false }} 1 {uid: 1, status: enqueued, details: { received_documents: 1, indexed_documents: None }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000001, documents_count: 1, allow_index_creation: true }} 2 {uid: 2, status: enqueued, details: { received_documents: 1, indexed_documents: None }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000002, documents_count: 1, allow_index_creation: false }} 3 {uid: 3, status: enqueued, details: { received_documents: 1, indexed_documents: None }, kind: DocumentAdditionOrUpdate { index_uid: "doggos", primary_key: Some("id"), method: ReplaceDocuments, content_file: 00000000-0000-0000-0000-000000000003, documents_count: 1, allow_index_creation: true }} diff --git a/meilisearch-types/src/error.rs b/meilisearch-types/src/error.rs index bc320d275..0f551d584 100644 --- a/meilisearch-types/src/error.rs +++ b/meilisearch-types/src/error.rs @@ -155,10 +155,7 @@ macro_rules! make_error_codes { /// return the doc url associated with the error fn url(&self) -> String { - format!( - "https://docs.meilisearch.com/errors#{}", - self.name().to_case(convert_case::Case::Kebab) - ) + format!("https://docs.meilisearch.com/errors#{}", self.name()) } } pub mod deserr_codes { diff --git a/meilisearch/src/routes/tasks.rs b/meilisearch/src/routes/tasks.rs index eb5cadf2d..b78be7876 100644 --- a/meilisearch/src/routes/tasks.rs +++ b/meilisearch/src/routes/tasks.rs @@ -567,7 +567,7 @@ mod tests { "message": "Invalid value in parameter `afterFinishedAt`: `2021` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_after_finished_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-after-finished-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_after_finished_at" } "###); } @@ -579,7 +579,7 @@ mod tests { "message": "Invalid value in parameter `beforeFinishedAt`: `2021` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_before_finished_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-before-finished-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_before_finished_at" } "###); } @@ -591,7 +591,7 @@ mod tests { "message": "Invalid value in parameter `afterEnqueuedAt`: `2021-12` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_after_enqueued_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-after-enqueued-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_after_enqueued_at" } "###); } @@ -604,7 +604,7 @@ mod tests { "message": "Invalid value in parameter `beforeEnqueuedAt`: `2021-12-03T23` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_before_enqueued_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-before-enqueued-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_before_enqueued_at" } "###); } @@ -616,7 +616,7 @@ mod tests { "message": "Invalid value in parameter `afterStartedAt`: `2021-12-03T23:45` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_after_started_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-after-started-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_after_started_at" } "###); } @@ -628,7 +628,7 @@ mod tests { "message": "Invalid value in parameter `beforeStartedAt`: `2021-12-03T23:45` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_before_started_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-before-started-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_before_started_at" } "###); } @@ -654,7 +654,7 @@ mod tests { "message": "Invalid value in parameter `uids[0]`: could not parse `cat` as a positive integer", "code": "invalid_task_uids", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-uids" + "link": "https://docs.meilisearch.com/errors#invalid_task_uids" } "###); } @@ -666,7 +666,7 @@ mod tests { "message": "Invalid value in parameter `uids[1]`: could not parse `hello` as a positive integer", "code": "invalid_task_uids", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-uids" + "link": "https://docs.meilisearch.com/errors#invalid_task_uids" } "###); } @@ -678,7 +678,7 @@ mod tests { "message": "Invalid value in parameter `uids`: could not parse `cat` as a positive integer", "code": "invalid_task_uids", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-uids" + "link": "https://docs.meilisearch.com/errors#invalid_task_uids" } "###); } @@ -704,7 +704,7 @@ mod tests { "message": "Invalid value in parameter `statuses`: `finished` is not a valid task status. Available statuses are `enqueued`, `processing`, `succeeded`, `failed`, `canceled`.", "code": "invalid_task_statuses", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-statuses" + "link": "https://docs.meilisearch.com/errors#invalid_task_statuses" } "###); } @@ -729,7 +729,7 @@ mod tests { "message": "Invalid value in parameter `types`: `createIndex` is not a valid task type. Available types are `documentAdditionOrUpdate`, `documentDeletion`, `settingsUpdate`, `indexCreation`, `indexDeletion`, `indexUpdate`, `indexSwap`, `taskCancelation`, `taskDeletion`, `dumpCreation`, `snapshotCreation`.", "code": "invalid_task_types", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-types" + "link": "https://docs.meilisearch.com/errors#invalid_task_types" } "###); } @@ -754,7 +754,7 @@ mod tests { "message": "Invalid value in parameter `indexUids[1]`: `hé` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).", "code": "invalid_index_uid", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-index-uid" + "link": "https://docs.meilisearch.com/errors#invalid_index_uid" } "###); } @@ -766,7 +766,7 @@ mod tests { "message": "Invalid value in parameter `indexUids`: `hé` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).", "code": "invalid_index_uid", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-index-uid" + "link": "https://docs.meilisearch.com/errors#invalid_index_uid" } "###); } @@ -801,7 +801,7 @@ mod tests { "message": "Invalid value in parameter `from`: could not parse `*` as a positive integer", "code": "invalid_task_from", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-from" + "link": "https://docs.meilisearch.com/errors#invalid_task_from" } "###); } @@ -814,7 +814,7 @@ mod tests { "message": "Unknown parameter `from`: expected one of `uids`, `canceledBy`, `types`, `statuses`, `indexUids`, `afterEnqueuedAt`, `beforeEnqueuedAt`, `afterStartedAt`, `beforeStartedAt`, `afterFinishedAt`, `beforeFinishedAt`", "code": "bad_request", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#bad-request" + "link": "https://docs.meilisearch.com/errors#bad_request" } "###); } @@ -827,7 +827,7 @@ mod tests { "message": "Unknown parameter `limit`: expected one of `uids`, `canceledBy`, `types`, `statuses`, `indexUids`, `afterEnqueuedAt`, `beforeEnqueuedAt`, `afterStartedAt`, `beforeStartedAt`, `afterFinishedAt`, `beforeFinishedAt`", "code": "bad_request", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#bad-request" + "link": "https://docs.meilisearch.com/errors#bad_request" } "###); } diff --git a/meilisearch/tests/auth/api_keys.rs b/meilisearch/tests/auth/api_keys.rs index aa829448b..f419a71cf 100644 --- a/meilisearch/tests/auth/api_keys.rs +++ b/meilisearch/tests/auth/api_keys.rs @@ -205,7 +205,7 @@ async fn error_add_api_key_no_header() { "message": "The Authorization header is missing. It must use the bearer authorization method.", "code": "missing_authorization_header", "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing-authorization-header" + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" } "###); } @@ -228,7 +228,7 @@ async fn error_add_api_key_bad_key() { "message": "The provided API key is invalid.", "code": "invalid_api_key", "type": "auth", - "link": "https://docs.meilisearch.com/errors#invalid-api-key" + "link": "https://docs.meilisearch.com/errors#invalid_api_key" } "###); } @@ -251,7 +251,7 @@ async fn error_add_api_key_missing_parameter() { "message": "Missing field `indexes`", "code": "missing_api_key_indexes", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#missing-api-key-indexes" + "link": "https://docs.meilisearch.com/errors#missing_api_key_indexes" } "###); @@ -268,7 +268,7 @@ async fn error_add_api_key_missing_parameter() { "message": "Missing field `actions`", "code": "missing_api_key_actions", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#missing-api-key-actions" + "link": "https://docs.meilisearch.com/errors#missing_api_key_actions" } "###); @@ -285,7 +285,7 @@ async fn error_add_api_key_missing_parameter() { "message": "Missing field `expiresAt`", "code": "missing_api_key_expires_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#missing-api-key-expires-at" + "link": "https://docs.meilisearch.com/errors#missing_api_key_expires_at" } "###); } @@ -308,7 +308,7 @@ async fn error_add_api_key_invalid_parameters_description() { "message": "Invalid value type at `.description`: expected a string, but found an object: `{\"name\":\"products\"}`", "code": "invalid_api_key_description", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-api-key-description" + "link": "https://docs.meilisearch.com/errors#invalid_api_key_description" } "###); } @@ -331,7 +331,7 @@ async fn error_add_api_key_invalid_parameters_name() { "message": "Invalid value type at `.name`: expected a string, but found an object: `{\"name\":\"products\"}`", "code": "invalid_api_key_name", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-api-key-name" + "link": "https://docs.meilisearch.com/errors#invalid_api_key_name" } "###); } @@ -354,7 +354,7 @@ async fn error_add_api_key_invalid_parameters_indexes() { "message": "Invalid value type at `.indexes`: expected an array, but found an object: `{\"name\":\"products\"}`", "code": "invalid_api_key_indexes", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-api-key-indexes" + "link": "https://docs.meilisearch.com/errors#invalid_api_key_indexes" } "###); } @@ -380,7 +380,7 @@ async fn error_add_api_key_invalid_index_uids() { "message": "Invalid value at `.indexes[0]`: `invalid index # / \\name with spaces` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).", "code": "invalid_api_key_indexes", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-api-key-indexes" + "link": "https://docs.meilisearch.com/errors#invalid_api_key_indexes" } "###); } @@ -405,7 +405,7 @@ async fn error_add_api_key_invalid_parameters_actions() { "message": "Invalid value type at `.actions`: expected an array, but found an object: `{\"name\":\"products\"}`", "code": "invalid_api_key_actions", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-api-key-actions" + "link": "https://docs.meilisearch.com/errors#invalid_api_key_actions" } "###); @@ -425,7 +425,7 @@ async fn error_add_api_key_invalid_parameters_actions() { "message": "Unknown value `doc.add` at `.actions[0]`: expected one of `*`, `search`, `documents.*`, `documents.add`, `documents.get`, `documents.delete`, `indexes.*`, `indexes.create`, `indexes.get`, `indexes.update`, `indexes.delete`, `indexes.swap`, `tasks.*`, `tasks.cancel`, `tasks.delete`, `tasks.get`, `settings.*`, `settings.get`, `settings.update`, `stats.*`, `stats.get`, `metrics.*`, `metrics.get`, `dumps.*`, `dumps.create`, `version`, `keys.create`, `keys.get`, `keys.update`, `keys.delete`", "code": "invalid_api_key_actions", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-api-key-actions" + "link": "https://docs.meilisearch.com/errors#invalid_api_key_actions" } "###); } @@ -449,7 +449,7 @@ async fn error_add_api_key_invalid_parameters_expires_at() { "message": "Invalid value type at `.expiresAt`: expected a string, but found an object: `{\"name\":\"products\"}`", "code": "invalid_api_key_expires_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-api-key-expires-at" + "link": "https://docs.meilisearch.com/errors#invalid_api_key_expires_at" } "###); } @@ -472,7 +472,7 @@ async fn error_add_api_key_invalid_parameters_expires_at_in_the_past() { "message": "Invalid value at `.expiresAt`: `2010-11-13T00:00:00Z` is not a valid date. It should follow the RFC 3339 format to represents a date or datetime in the future or specified as a null value. e.g. 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS'.\n", "code": "invalid_api_key_expires_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-api-key-expires-at" + "link": "https://docs.meilisearch.com/errors#invalid_api_key_expires_at" } "###); meili_snap::snapshot!(code, @"400 Bad Request"); @@ -497,7 +497,7 @@ async fn error_add_api_key_invalid_parameters_uid() { "message": "Invalid value at `.uid`: invalid length: expected length 32 for simple format, found 13", "code": "invalid_api_key_uid", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-api-key-uid" + "link": "https://docs.meilisearch.com/errors#invalid_api_key_uid" } "###); meili_snap::snapshot!(code, @"400 Bad Request"); @@ -542,7 +542,7 @@ async fn error_add_api_key_parameters_uid_already_exist() { "message": "`uid` field value `4bc0887a-0e41-4f3b-935d-0c451dcee9c8` is already an existing API key.", "code": "api_key_already_exists", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#api-key-already-exists" + "link": "https://docs.meilisearch.com/errors#api_key_already_exists" } "###); meili_snap::snapshot!(code, @"409 Conflict"); @@ -688,7 +688,7 @@ async fn error_get_api_key_no_header() { "message": "The Authorization header is missing. It must use the bearer authorization method.", "code": "missing_authorization_header", "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing-authorization-header" + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" } "###); meili_snap::snapshot!(code, @"401 Unauthorized"); @@ -707,7 +707,7 @@ async fn error_get_api_key_bad_key() { "message": "The provided API key is invalid.", "code": "invalid_api_key", "type": "auth", - "link": "https://docs.meilisearch.com/errors#invalid-api-key" + "link": "https://docs.meilisearch.com/errors#invalid_api_key" } "###); meili_snap::snapshot!(code, @"403 Forbidden"); @@ -726,7 +726,7 @@ async fn error_get_api_key_not_found() { "message": "API key `d0552b41d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4` not found.", "code": "api_key_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#api-key-not-found" + "link": "https://docs.meilisearch.com/errors#api_key_not_found" } "###); meili_snap::snapshot!(code, @"404 Not Found"); @@ -870,7 +870,7 @@ async fn error_list_api_keys_no_header() { "message": "The Authorization header is missing. It must use the bearer authorization method.", "code": "missing_authorization_header", "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing-authorization-header" + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" } "###); meili_snap::snapshot!(code, @"401 Unauthorized"); @@ -887,7 +887,7 @@ async fn error_list_api_keys_bad_key() { "message": "The provided API key is invalid.", "code": "invalid_api_key", "type": "auth", - "link": "https://docs.meilisearch.com/errors#invalid-api-key" + "link": "https://docs.meilisearch.com/errors#invalid_api_key" } "###); meili_snap::snapshot!(code, @"403 Forbidden"); @@ -964,7 +964,7 @@ async fn delete_api_key() { "message": "[ignored]", "code": "api_key_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#api-key-not-found" + "link": "https://docs.meilisearch.com/errors#api_key_not_found" } "###); meili_snap::snapshot!(code, @"404 Not Found"); @@ -983,7 +983,7 @@ async fn error_delete_api_key_no_header() { "message": "The Authorization header is missing. It must use the bearer authorization method.", "code": "missing_authorization_header", "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing-authorization-header" + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" } "###); meili_snap::snapshot!(code, @"401 Unauthorized"); @@ -1002,7 +1002,7 @@ async fn error_delete_api_key_bad_key() { "message": "The provided API key is invalid.", "code": "invalid_api_key", "type": "auth", - "link": "https://docs.meilisearch.com/errors#invalid-api-key" + "link": "https://docs.meilisearch.com/errors#invalid_api_key" } "###); meili_snap::snapshot!(code, @"403 Forbidden"); @@ -1021,7 +1021,7 @@ async fn error_delete_api_key_not_found() { "message": "API key `d0552b41d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4` not found.", "code": "api_key_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#api-key-not-found" + "link": "https://docs.meilisearch.com/errors#api_key_not_found" } "###); meili_snap::snapshot!(code, @"404 Not Found"); @@ -1397,7 +1397,7 @@ async fn error_patch_api_key_indexes() { "message": "Unknown field `indexes`: expected one of `description`, `name`", "code": "immutable_api_key_indexes", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#immutable-api-key-indexes" + "link": "https://docs.meilisearch.com/errors#immutable_api_key_indexes" } "###); meili_snap::snapshot!(code, @"400 Bad Request"); @@ -1474,7 +1474,7 @@ async fn error_patch_api_key_actions() { "message": "Unknown field `actions`: expected one of `description`, `name`", "code": "immutable_api_key_actions", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#immutable-api-key-actions" + "link": "https://docs.meilisearch.com/errors#immutable_api_key_actions" } "###); meili_snap::snapshot!(code, @"400 Bad Request"); @@ -1543,7 +1543,7 @@ async fn error_patch_api_key_expiration_date() { "message": "Unknown field `expiresAt`: expected one of `description`, `name`", "code": "immutable_api_key_expires_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#immutable-api-key-expires-at" + "link": "https://docs.meilisearch.com/errors#immutable_api_key_expires_at" } "###); meili_snap::snapshot!(code, @"400 Bad Request"); @@ -1565,7 +1565,7 @@ async fn error_patch_api_key_no_header() { "message": "The Authorization header is missing. It must use the bearer authorization method.", "code": "missing_authorization_header", "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing-authorization-header" + "link": "https://docs.meilisearch.com/errors#missing_authorization_header" } "###); meili_snap::snapshot!(code, @"401 Unauthorized"); @@ -1588,7 +1588,7 @@ async fn error_patch_api_key_bad_key() { "message": "The provided API key is invalid.", "code": "invalid_api_key", "type": "auth", - "link": "https://docs.meilisearch.com/errors#invalid-api-key" + "link": "https://docs.meilisearch.com/errors#invalid_api_key" } "###); meili_snap::snapshot!(code, @"403 Forbidden"); @@ -1611,7 +1611,7 @@ async fn error_patch_api_key_not_found() { "message": "API key `d0552b41d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4` not found.", "code": "api_key_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#api-key-not-found" + "link": "https://docs.meilisearch.com/errors#api_key_not_found" } "###); meili_snap::snapshot!(code, @"404 Not Found"); @@ -1664,7 +1664,7 @@ async fn error_patch_api_key_indexes_invalid_parameters() { "message": "Invalid value type at `.description`: expected a string, but found a positive integer: `13`", "code": "invalid_api_key_description", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-api-key-description" + "link": "https://docs.meilisearch.com/errors#invalid_api_key_description" } "###); meili_snap::snapshot!(code, @"400 Bad Request"); @@ -1680,7 +1680,7 @@ async fn error_patch_api_key_indexes_invalid_parameters() { "message": "Invalid value type at `.name`: expected a string, but found a positive integer: `13`", "code": "invalid_api_key_name", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-api-key-name" + "link": "https://docs.meilisearch.com/errors#invalid_api_key_name" } "###); meili_snap::snapshot!(code, @"400 Bad Request"); @@ -1696,7 +1696,7 @@ async fn error_access_api_key_routes_no_master_key_set() { "message": "Meilisearch is running without a master key. To access this API endpoint, you must have set a master key at launch.", "code": "missing_master_key", "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing-master-key" + "link": "https://docs.meilisearch.com/errors#missing_master_key" } "###); meili_snap::snapshot!(code, @"401 Unauthorized"); @@ -1707,7 +1707,7 @@ async fn error_access_api_key_routes_no_master_key_set() { "message": "Meilisearch is running without a master key. To access this API endpoint, you must have set a master key at launch.", "code": "missing_master_key", "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing-master-key" + "link": "https://docs.meilisearch.com/errors#missing_master_key" } "###); meili_snap::snapshot!(code, @"401 Unauthorized"); @@ -1718,7 +1718,7 @@ async fn error_access_api_key_routes_no_master_key_set() { "message": "Meilisearch is running without a master key. To access this API endpoint, you must have set a master key at launch.", "code": "missing_master_key", "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing-master-key" + "link": "https://docs.meilisearch.com/errors#missing_master_key" } "###); meili_snap::snapshot!(code, @"401 Unauthorized"); @@ -1729,7 +1729,7 @@ async fn error_access_api_key_routes_no_master_key_set() { "message": "Meilisearch is running without a master key. To access this API endpoint, you must have set a master key at launch.", "code": "missing_master_key", "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing-master-key" + "link": "https://docs.meilisearch.com/errors#missing_master_key" } "###); meili_snap::snapshot!(code, @"401 Unauthorized"); @@ -1742,7 +1742,7 @@ async fn error_access_api_key_routes_no_master_key_set() { "message": "Meilisearch is running without a master key. To access this API endpoint, you must have set a master key at launch.", "code": "missing_master_key", "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing-master-key" + "link": "https://docs.meilisearch.com/errors#missing_master_key" } "###); meili_snap::snapshot!(code, @"401 Unauthorized"); @@ -1753,7 +1753,7 @@ async fn error_access_api_key_routes_no_master_key_set() { "message": "Meilisearch is running without a master key. To access this API endpoint, you must have set a master key at launch.", "code": "missing_master_key", "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing-master-key" + "link": "https://docs.meilisearch.com/errors#missing_master_key" } "###); meili_snap::snapshot!(code, @"401 Unauthorized"); @@ -1764,7 +1764,7 @@ async fn error_access_api_key_routes_no_master_key_set() { "message": "Meilisearch is running without a master key. To access this API endpoint, you must have set a master key at launch.", "code": "missing_master_key", "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing-master-key" + "link": "https://docs.meilisearch.com/errors#missing_master_key" } "###); meili_snap::snapshot!(code, @"401 Unauthorized"); @@ -1775,7 +1775,7 @@ async fn error_access_api_key_routes_no_master_key_set() { "message": "Meilisearch is running without a master key. To access this API endpoint, you must have set a master key at launch.", "code": "missing_master_key", "type": "auth", - "link": "https://docs.meilisearch.com/errors#missing-master-key" + "link": "https://docs.meilisearch.com/errors#missing_master_key" } "###); meili_snap::snapshot!(code, @"401 Unauthorized"); diff --git a/meilisearch/tests/auth/authorization.rs b/meilisearch/tests/auth/authorization.rs index 8ef2d108d..fae6ee7e1 100644 --- a/meilisearch/tests/auth/authorization.rs +++ b/meilisearch/tests/auth/authorization.rs @@ -73,7 +73,7 @@ static INVALID_RESPONSE: Lazy = Lazy::new(|| { json!({"message": "The provided API key is invalid.", "code": "invalid_api_key", "type": "auth", - "link": "https://docs.meilisearch.com/errors#invalid-api-key" + "link": "https://docs.meilisearch.com/errors#invalid_api_key" }) }); @@ -520,7 +520,7 @@ async fn error_creating_index_without_action() { "message": "Index `test` not found.", "code": "index_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-not-found" + "link": "https://docs.meilisearch.com/errors#index_not_found" }); // try to create a index via add documents route diff --git a/meilisearch/tests/auth/payload.rs b/meilisearch/tests/auth/payload.rs index 8164acf48..78eec3eb2 100644 --- a/meilisearch/tests/auth/payload.rs +++ b/meilisearch/tests/auth/payload.rs @@ -37,7 +37,7 @@ async fn error_api_key_bad_content_types() { ); assert_eq!(response["code"], "invalid_content_type"); assert_eq!(response["type"], "invalid_request"); - assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid-content-type"); + assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid_content_type"); // patch let req = test::TestRequest::patch() @@ -59,7 +59,7 @@ async fn error_api_key_bad_content_types() { ); assert_eq!(response["code"], "invalid_content_type"); assert_eq!(response["type"], "invalid_request"); - assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid-content-type"); + assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid_content_type"); } #[actix_rt::test] @@ -96,7 +96,7 @@ async fn error_api_key_empty_content_types() { ); assert_eq!(response["code"], "invalid_content_type"); assert_eq!(response["type"], "invalid_request"); - assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid-content-type"); + assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid_content_type"); // patch let req = test::TestRequest::patch() @@ -118,7 +118,7 @@ async fn error_api_key_empty_content_types() { ); assert_eq!(response["code"], "invalid_content_type"); assert_eq!(response["type"], "invalid_request"); - assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid-content-type"); + assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid_content_type"); } #[actix_rt::test] @@ -154,7 +154,7 @@ async fn error_api_key_missing_content_types() { ); assert_eq!(response["code"], "missing_content_type"); assert_eq!(response["type"], "invalid_request"); - assert_eq!(response["link"], "https://docs.meilisearch.com/errors#missing-content-type"); + assert_eq!(response["link"], "https://docs.meilisearch.com/errors#missing_content_type"); // patch let req = test::TestRequest::patch() @@ -175,7 +175,7 @@ async fn error_api_key_missing_content_types() { ); assert_eq!(response["code"], "missing_content_type"); assert_eq!(response["type"], "invalid_request"); - assert_eq!(response["link"], "https://docs.meilisearch.com/errors#missing-content-type"); + assert_eq!(response["link"], "https://docs.meilisearch.com/errors#missing_content_type"); } #[actix_rt::test] @@ -200,7 +200,7 @@ async fn error_api_key_empty_payload() { assert_eq!(status_code, 400); assert_eq!(response["code"], json!("missing_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing_payload")); assert_eq!(response["message"], json!(r#"A json payload is missing."#)); // patch @@ -217,7 +217,7 @@ async fn error_api_key_empty_payload() { assert_eq!(status_code, 400); assert_eq!(response["code"], json!("missing_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing_payload")); assert_eq!(response["message"], json!(r#"A json payload is missing."#)); } @@ -243,7 +243,7 @@ async fn error_api_key_malformed_payload() { assert_eq!(status_code, 400); assert_eq!(response["code"], json!("malformed_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload")); assert_eq!( response["message"], json!( @@ -265,7 +265,7 @@ async fn error_api_key_malformed_payload() { assert_eq!(status_code, 400); assert_eq!(response["code"], json!("malformed_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload")); assert_eq!( response["message"], json!( diff --git a/meilisearch/tests/auth/tenant_token.rs b/meilisearch/tests/auth/tenant_token.rs index af3e7c2a5..fbf9d2b49 100644 --- a/meilisearch/tests/auth/tenant_token.rs +++ b/meilisearch/tests/auth/tenant_token.rs @@ -56,7 +56,7 @@ static INVALID_RESPONSE: Lazy = Lazy::new(|| { json!({"message": "The provided API key is invalid.", "code": "invalid_api_key", "type": "auth", - "link": "https://docs.meilisearch.com/errors#invalid-api-key" + "link": "https://docs.meilisearch.com/errors#invalid_api_key" }) }); diff --git a/meilisearch/tests/content_type.rs b/meilisearch/tests/content_type.rs index 5759d4d9e..e16a83c06 100644 --- a/meilisearch/tests/content_type.rs +++ b/meilisearch/tests/content_type.rs @@ -88,7 +88,7 @@ async fn error_json_bad_content_type() { "message": r#"A Content-Type header is missing. Accepted values for the Content-Type header are: `application/json`"#, "code": "missing_content_type", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#missing-content-type", + "link": "https://docs.meilisearch.com/errors#missing_content_type", }), "when calling the route `{}` with no content-type", route, @@ -117,7 +117,7 @@ async fn error_json_bad_content_type() { "message": expected_error_message, "code": "invalid_content_type", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-content-type", + "link": "https://docs.meilisearch.com/errors#invalid_content_type", }), "when calling the route `{}` with a content-type of `{}`", route, diff --git a/meilisearch/tests/documents/add_documents.rs b/meilisearch/tests/documents/add_documents.rs index 8452955fd..64bdcac78 100644 --- a/meilisearch/tests/documents/add_documents.rs +++ b/meilisearch/tests/documents/add_documents.rs @@ -193,7 +193,7 @@ async fn error_add_documents_test_bad_content_types() { ); assert_eq!(response["code"], "invalid_content_type"); assert_eq!(response["type"], "invalid_request"); - assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid-content-type"); + assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid_content_type"); // put let req = test::TestRequest::put() @@ -214,7 +214,7 @@ async fn error_add_documents_test_bad_content_types() { ); assert_eq!(response["code"], "invalid_content_type"); assert_eq!(response["type"], "invalid_request"); - assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid-content-type"); + assert_eq!(response["link"], "https://docs.meilisearch.com/errors#invalid_content_type"); } /// missing content-type must be refused @@ -248,7 +248,7 @@ async fn error_add_documents_test_no_content_type() { ); assert_eq!(response["code"], "missing_content_type"); assert_eq!(response["type"], "invalid_request"); - assert_eq!(response["link"], "https://docs.meilisearch.com/errors#missing-content-type"); + assert_eq!(response["link"], "https://docs.meilisearch.com/errors#missing_content_type"); // put let req = test::TestRequest::put() @@ -268,7 +268,7 @@ async fn error_add_documents_test_no_content_type() { ); assert_eq!(response["code"], "missing_content_type"); assert_eq!(response["type"], "invalid_request"); - assert_eq!(response["link"], "https://docs.meilisearch.com/errors#missing-content-type"); + assert_eq!(response["link"], "https://docs.meilisearch.com/errors#missing_content_type"); } #[actix_rt::test] @@ -297,7 +297,7 @@ async fn error_add_malformed_csv_documents() { ); assert_eq!(response["code"], json!("malformed_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload")); // put let req = test::TestRequest::put() @@ -318,7 +318,7 @@ async fn error_add_malformed_csv_documents() { ); assert_eq!(response["code"], json!("malformed_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload")); } #[actix_rt::test] @@ -347,7 +347,7 @@ async fn error_add_malformed_json_documents() { ); assert_eq!(response["code"], json!("malformed_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload")); // put let req = test::TestRequest::put() @@ -368,7 +368,7 @@ async fn error_add_malformed_json_documents() { ); assert_eq!(response["code"], json!("malformed_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload")); // truncate @@ -393,7 +393,7 @@ async fn error_add_malformed_json_documents() { ); assert_eq!(response["code"], json!("malformed_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload")); // add one more char to the long string to test if the truncating works. let document = format!("\"{}m\"", long); @@ -412,7 +412,7 @@ async fn error_add_malformed_json_documents() { ); assert_eq!(response["code"], json!("malformed_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload")); } #[actix_rt::test] @@ -441,7 +441,7 @@ async fn error_add_malformed_ndjson_documents() { ); assert_eq!(response["code"], json!("malformed_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload")); // put let req = test::TestRequest::put() @@ -460,7 +460,7 @@ async fn error_add_malformed_ndjson_documents() { ); assert_eq!(response["code"], json!("malformed_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#malformed_payload")); } #[actix_rt::test] @@ -484,7 +484,7 @@ async fn error_add_missing_payload_csv_documents() { assert_eq!(response["message"], json!(r#"A csv payload is missing."#)); assert_eq!(response["code"], json!("missing_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing_payload")); // put let req = test::TestRequest::put() @@ -500,7 +500,7 @@ async fn error_add_missing_payload_csv_documents() { assert_eq!(response["message"], json!(r#"A csv payload is missing."#)); assert_eq!(response["code"], json!("missing_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing_payload")); } #[actix_rt::test] @@ -524,7 +524,7 @@ async fn error_add_missing_payload_json_documents() { assert_eq!(response["message"], json!(r#"A json payload is missing."#)); assert_eq!(response["code"], json!("missing_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing_payload")); // put let req = test::TestRequest::put() @@ -540,7 +540,7 @@ async fn error_add_missing_payload_json_documents() { assert_eq!(response["message"], json!(r#"A json payload is missing."#)); assert_eq!(response["code"], json!("missing_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing_payload")); } #[actix_rt::test] @@ -564,7 +564,7 @@ async fn error_add_missing_payload_ndjson_documents() { assert_eq!(response["message"], json!(r#"A ndjson payload is missing."#)); assert_eq!(response["code"], json!("missing_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing_payload")); // put let req = test::TestRequest::put() @@ -580,7 +580,7 @@ async fn error_add_missing_payload_ndjson_documents() { assert_eq!(response["message"], json!(r#"A ndjson payload is missing."#)); assert_eq!(response["code"], json!("missing_payload")); assert_eq!(response["type"], json!("invalid_request")); - assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing-payload")); + assert_eq!(response["link"], json!("https://docs.meilisearch.com/errors#missing_payload")); } #[actix_rt::test] @@ -639,7 +639,7 @@ async fn error_document_add_create_index_bad_uid() { "message": "`883 fj!` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).", "code": "invalid_index_uid", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-index-uid" + "link": "https://docs.meilisearch.com/errors#invalid_index_uid" }); assert_eq!(code, 400); @@ -781,7 +781,7 @@ async fn error_add_documents_bad_document_id() { assert_eq!(response["error"]["type"], json!("invalid_request")); assert_eq!( response["error"]["link"], - json!("https://docs.meilisearch.com/errors#invalid-document-id") + json!("https://docs.meilisearch.com/errors#invalid_document_id") ); } @@ -809,7 +809,7 @@ async fn error_add_documents_missing_document_id() { assert_eq!(response["error"]["type"], json!("invalid_request")); assert_eq!( response["error"]["link"], - json!("https://docs.meilisearch.com/errors#missing-document-id") + json!("https://docs.meilisearch.com/errors#missing_document_id") ); } @@ -843,7 +843,7 @@ async fn error_document_field_limit_reached() { "message": "A document cannot contain more than 65,535 fields.", "code": "document_fields_limit_reached", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#document-fields-limit-reached" + "link": "https://docs.meilisearch.com/errors#document_fields_limit_reached" }); assert_eq!(response["error"], expected_error); @@ -889,7 +889,7 @@ async fn error_add_documents_payload_size() { "message": "The provided payload reached the size limit.", "code": "payload_too_large", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#payload-too-large" + "link": "https://docs.meilisearch.com/errors#payload_too_large" }); assert_eq!(response, expected_response); @@ -929,7 +929,7 @@ async fn error_primary_key_inference() { "message": "The primary key inference failed as the engine did not find any field ending with `id` in its name. Please specify the primary key manually using the `primaryKey` query parameter.", "code": "index_primary_key_no_candidate_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-primary-key-no-candidate-found" + "link": "https://docs.meilisearch.com/errors#index_primary_key_no_candidate_found" }, "duration": "[duration]", "enqueuedAt": "[date]", @@ -969,7 +969,7 @@ async fn error_primary_key_inference() { "message": "The primary key inference failed as the engine found 3 fields ending with `id` in their names: 'id' and 'object_id'. Please specify the primary key manually using the `primaryKey` query parameter.", "code": "index_primary_key_multiple_candidates_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-primary-key-multiple-candidates-found" + "link": "https://docs.meilisearch.com/errors#index_primary_key_multiple_candidates_found" }, "duration": "[duration]", "enqueuedAt": "[date]", diff --git a/meilisearch/tests/documents/delete_documents.rs b/meilisearch/tests/documents/delete_documents.rs index 0abc24eca..e36e2f033 100644 --- a/meilisearch/tests/documents/delete_documents.rs +++ b/meilisearch/tests/documents/delete_documents.rs @@ -95,7 +95,7 @@ async fn error_delete_batch_unexisting_index() { "message": "Index `test` not found.", "code": "index_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-not-found" + "link": "https://docs.meilisearch.com/errors#index_not_found" }); assert_eq!(code, 202); diff --git a/meilisearch/tests/documents/errors.rs b/meilisearch/tests/documents/errors.rs index 4c50a8e02..ffec01062 100644 --- a/meilisearch/tests/documents/errors.rs +++ b/meilisearch/tests/documents/errors.rs @@ -15,7 +15,7 @@ async fn get_all_documents_bad_offset() { "message": "Invalid value in parameter `offset`: could not parse `` as a positive integer", "code": "invalid_document_offset", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-document-offset" + "link": "https://docs.meilisearch.com/errors#invalid_document_offset" } "###); @@ -26,7 +26,7 @@ async fn get_all_documents_bad_offset() { "message": "Invalid value in parameter `offset`: could not parse `doggo` as a positive integer", "code": "invalid_document_offset", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-document-offset" + "link": "https://docs.meilisearch.com/errors#invalid_document_offset" } "###); @@ -37,7 +37,7 @@ async fn get_all_documents_bad_offset() { "message": "Invalid value in parameter `offset`: could not parse `-1` as a positive integer", "code": "invalid_document_offset", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-document-offset" + "link": "https://docs.meilisearch.com/errors#invalid_document_offset" } "###); } @@ -54,7 +54,7 @@ async fn get_all_documents_bad_limit() { "message": "Invalid value in parameter `limit`: could not parse `` as a positive integer", "code": "invalid_document_limit", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-document-limit" + "link": "https://docs.meilisearch.com/errors#invalid_document_limit" } "###); @@ -65,7 +65,7 @@ async fn get_all_documents_bad_limit() { "message": "Invalid value in parameter `limit`: could not parse `doggo` as a positive integer", "code": "invalid_document_limit", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-document-limit" + "link": "https://docs.meilisearch.com/errors#invalid_document_limit" } "###); @@ -76,7 +76,7 @@ async fn get_all_documents_bad_limit() { "message": "Invalid value in parameter `limit`: could not parse `-1` as a positive integer", "code": "invalid_document_limit", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-document-limit" + "link": "https://docs.meilisearch.com/errors#invalid_document_limit" } "###); } @@ -93,7 +93,7 @@ async fn delete_documents_batch() { "message": "Json deserialize error: invalid type: string \"doggo\", expected a sequence at line 1 column 7", "code": "bad_request", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#bad-request" + "link": "https://docs.meilisearch.com/errors#bad_request" } "###); } diff --git a/meilisearch/tests/documents/get_documents.rs b/meilisearch/tests/documents/get_documents.rs index 69c60dbb4..9bc54973e 100644 --- a/meilisearch/tests/documents/get_documents.rs +++ b/meilisearch/tests/documents/get_documents.rs @@ -27,7 +27,7 @@ async fn error_get_unexisting_document() { "message": "Document `1` not found.", "code": "document_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#document-not-found" + "link": "https://docs.meilisearch.com/errors#document_not_found" }); assert_eq!(response, expected_response); @@ -90,7 +90,7 @@ async fn error_get_unexisting_index_all_documents() { "message": "Index `test` not found.", "code": "index_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-not-found" + "link": "https://docs.meilisearch.com/errors#index_not_found" }); assert_eq!(response, expected_response); diff --git a/meilisearch/tests/documents/update_documents.rs b/meilisearch/tests/documents/update_documents.rs index 3f31eb2e7..688605861 100644 --- a/meilisearch/tests/documents/update_documents.rs +++ b/meilisearch/tests/documents/update_documents.rs @@ -13,7 +13,7 @@ async fn error_document_update_create_index_bad_uid() { "message": "`883 fj!` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).", "code": "invalid_index_uid", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-index-uid" + "link": "https://docs.meilisearch.com/errors#invalid_index_uid" }); assert_eq!(code, 400); @@ -167,7 +167,7 @@ async fn error_update_documents_bad_document_id() { assert_eq!(response["error"]["type"], json!("invalid_request")); assert_eq!( response["error"]["link"], - json!("https://docs.meilisearch.com/errors#invalid-document-id") + json!("https://docs.meilisearch.com/errors#invalid_document_id") ); } @@ -193,6 +193,6 @@ async fn error_update_documents_missing_document_id() { assert_eq!(response["error"]["type"], "invalid_request"); assert_eq!( response["error"]["link"], - "https://docs.meilisearch.com/errors#missing-document-id" + "https://docs.meilisearch.com/errors#missing_document_id" ); } diff --git a/meilisearch/tests/index/create_index.rs b/meilisearch/tests/index/create_index.rs index 884a0b069..48a07b67f 100644 --- a/meilisearch/tests/index/create_index.rs +++ b/meilisearch/tests/index/create_index.rs @@ -177,7 +177,7 @@ async fn error_create_existing_index() { "message": "Index `test` already exists.", "code": "index_already_exists", "type": "invalid_request", - "link":"https://docs.meilisearch.com/errors#index-already-exists" + "link":"https://docs.meilisearch.com/errors#index_already_exists" }); assert_eq!(response["error"], expected_response); @@ -195,7 +195,7 @@ async fn error_create_with_invalid_index_uid() { "message": "Invalid value at `.uid`: `test test#!` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).", "code": "invalid_index_uid", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-index-uid" + "link": "https://docs.meilisearch.com/errors#invalid_index_uid" } "###); } diff --git a/meilisearch/tests/index/delete_index.rs b/meilisearch/tests/index/delete_index.rs index 2c5fb51b2..b6efc7a68 100644 --- a/meilisearch/tests/index/delete_index.rs +++ b/meilisearch/tests/index/delete_index.rs @@ -35,7 +35,7 @@ async fn error_delete_unexisting_index() { "message": "Index `test` not found.", "code": "index_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-not-found" + "link": "https://docs.meilisearch.com/errors#index_not_found" }); let response = index.wait_task(0).await; diff --git a/meilisearch/tests/index/get_index.rs b/meilisearch/tests/index/get_index.rs index 6e70484f6..5a184c8ce 100644 --- a/meilisearch/tests/index/get_index.rs +++ b/meilisearch/tests/index/get_index.rs @@ -35,7 +35,7 @@ async fn error_get_unexisting_index() { "message": "Index `test` not found.", "code": "index_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-not-found" + "link": "https://docs.meilisearch.com/errors#index_not_found" }); assert_eq!(response, expected_response); @@ -189,7 +189,7 @@ async fn get_invalid_index_uid() { "message": "`this is not a valid index name` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).", "code": "invalid_index_uid", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-index-uid" + "link": "https://docs.meilisearch.com/errors#invalid_index_uid" } "###); } diff --git a/meilisearch/tests/index/stats.rs b/meilisearch/tests/index/stats.rs index a5828e32b..813f05b4a 100644 --- a/meilisearch/tests/index/stats.rs +++ b/meilisearch/tests/index/stats.rs @@ -55,7 +55,7 @@ async fn error_get_stats_unexisting_index() { "message": "Index `test` not found.", "code": "index_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-not-found" + "link": "https://docs.meilisearch.com/errors#index_not_found" }); assert_eq!(response, expected_response); diff --git a/meilisearch/tests/index/update_index.rs b/meilisearch/tests/index/update_index.rs index cad55babe..3c283407c 100644 --- a/meilisearch/tests/index/update_index.rs +++ b/meilisearch/tests/index/update_index.rs @@ -98,7 +98,7 @@ async fn error_update_existing_primary_key() { "message": "Index already has a primary key: `id`.", "code": "index_primary_key_already_exists", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-primary-key-already-exists" + "link": "https://docs.meilisearch.com/errors#index_primary_key_already_exists" }); assert_eq!(response["error"], expected_response); @@ -117,7 +117,7 @@ async fn error_update_unexisting_index() { "message": "Index `test` not found.", "code": "index_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-not-found" + "link": "https://docs.meilisearch.com/errors#index_not_found" }); assert_eq!(response["error"], expected_response); diff --git a/meilisearch/tests/search/errors.rs b/meilisearch/tests/search/errors.rs index 1149d71a5..42f248452 100644 --- a/meilisearch/tests/search/errors.rs +++ b/meilisearch/tests/search/errors.rs @@ -13,7 +13,7 @@ async fn search_unexisting_index() { "message": "Index `test` not found.", "code": "index_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-not-found" + "link": "https://docs.meilisearch.com/errors#index_not_found" }); index @@ -49,7 +49,7 @@ async fn search_bad_q() { "message": "Invalid value type at `.q`: expected a string, but found an array: `[\"doggo\"]`", "code": "invalid_search_q", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-q" + "link": "https://docs.meilisearch.com/errors#invalid_search_q" } "###); // Can't make the `q` fail with a get search since it'll accept anything as a string. @@ -67,7 +67,7 @@ async fn search_bad_offset() { "message": "Invalid value type at `.offset`: expected a positive integer, but found a string: `\"doggo\"`", "code": "invalid_search_offset", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-offset" + "link": "https://docs.meilisearch.com/errors#invalid_search_offset" } "###); @@ -78,7 +78,7 @@ async fn search_bad_offset() { "message": "Invalid value in parameter `offset`: could not parse `doggo` as a positive integer", "code": "invalid_search_offset", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-offset" + "link": "https://docs.meilisearch.com/errors#invalid_search_offset" } "###); } @@ -95,7 +95,7 @@ async fn search_bad_limit() { "message": "Invalid value type at `.limit`: expected a positive integer, but found a string: `\"doggo\"`", "code": "invalid_search_limit", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-limit" + "link": "https://docs.meilisearch.com/errors#invalid_search_limit" } "###); @@ -106,7 +106,7 @@ async fn search_bad_limit() { "message": "Invalid value in parameter `limit`: could not parse `doggo` as a positive integer", "code": "invalid_search_limit", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-limit" + "link": "https://docs.meilisearch.com/errors#invalid_search_limit" } "###); } @@ -123,7 +123,7 @@ async fn search_bad_page() { "message": "Invalid value type at `.page`: expected a positive integer, but found a string: `\"doggo\"`", "code": "invalid_search_page", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-page" + "link": "https://docs.meilisearch.com/errors#invalid_search_page" } "###); @@ -134,7 +134,7 @@ async fn search_bad_page() { "message": "Invalid value in parameter `page`: could not parse `doggo` as a positive integer", "code": "invalid_search_page", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-page" + "link": "https://docs.meilisearch.com/errors#invalid_search_page" } "###); } @@ -151,7 +151,7 @@ async fn search_bad_hits_per_page() { "message": "Invalid value type at `.hitsPerPage`: expected a positive integer, but found a string: `\"doggo\"`", "code": "invalid_search_hits_per_page", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-hits-per-page" + "link": "https://docs.meilisearch.com/errors#invalid_search_hits_per_page" } "###); @@ -162,7 +162,7 @@ async fn search_bad_hits_per_page() { "message": "Invalid value in parameter `hitsPerPage`: could not parse `doggo` as a positive integer", "code": "invalid_search_hits_per_page", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-hits-per-page" + "link": "https://docs.meilisearch.com/errors#invalid_search_hits_per_page" } "###); } @@ -179,7 +179,7 @@ async fn search_bad_attributes_to_crop() { "message": "Invalid value type at `.attributesToCrop`: expected an array, but found a string: `\"doggo\"`", "code": "invalid_search_attributes_to_crop", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-attributes-to-crop" + "link": "https://docs.meilisearch.com/errors#invalid_search_attributes_to_crop" } "###); // Can't make the `attributes_to_crop` fail with a get search since it'll accept anything as an array of strings. @@ -197,7 +197,7 @@ async fn search_bad_crop_length() { "message": "Invalid value type at `.cropLength`: expected a positive integer, but found a string: `\"doggo\"`", "code": "invalid_search_crop_length", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-crop-length" + "link": "https://docs.meilisearch.com/errors#invalid_search_crop_length" } "###); @@ -208,7 +208,7 @@ async fn search_bad_crop_length() { "message": "Invalid value in parameter `cropLength`: could not parse `doggo` as a positive integer", "code": "invalid_search_crop_length", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-crop-length" + "link": "https://docs.meilisearch.com/errors#invalid_search_crop_length" } "###); } @@ -225,7 +225,7 @@ async fn search_bad_attributes_to_highlight() { "message": "Invalid value type at `.attributesToHighlight`: expected an array, but found a string: `\"doggo\"`", "code": "invalid_search_attributes_to_highlight", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-attributes-to-highlight" + "link": "https://docs.meilisearch.com/errors#invalid_search_attributes_to_highlight" } "###); // Can't make the `attributes_to_highlight` fail with a get search since it'll accept anything as an array of strings. @@ -251,7 +251,7 @@ async fn search_bad_filter() { "message": "Invalid syntax for the filter parameter: `expected String, Array, found: true`.", "code": "invalid_search_filter", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-filter" + "link": "https://docs.meilisearch.com/errors#invalid_search_filter" } "###); // Can't make the `filter` fail with a get search since it'll accept anything as a strings. @@ -269,7 +269,7 @@ async fn search_bad_sort() { "message": "Invalid value type at `.sort`: expected an array, but found a string: `\"doggo\"`", "code": "invalid_search_sort", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-sort" + "link": "https://docs.meilisearch.com/errors#invalid_search_sort" } "###); // Can't make the `sort` fail with a get search since it'll accept anything as a strings. @@ -287,7 +287,7 @@ async fn search_bad_show_matches_position() { "message": "Invalid value type at `.showMatchesPosition`: expected a boolean, but found a string: `\"doggo\"`", "code": "invalid_search_show_matches_position", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-show-matches-position" + "link": "https://docs.meilisearch.com/errors#invalid_search_show_matches_position" } "###); @@ -298,7 +298,7 @@ async fn search_bad_show_matches_position() { "message": "Invalid value in parameter `showMatchesPosition`: could not parse `doggo` as a boolean, expected either `true` or `false`", "code": "invalid_search_show_matches_position", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-show-matches-position" + "link": "https://docs.meilisearch.com/errors#invalid_search_show_matches_position" } "###); } @@ -315,7 +315,7 @@ async fn search_bad_facets() { "message": "Invalid value type at `.facets`: expected an array, but found a string: `\"doggo\"`", "code": "invalid_search_facets", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-facets" + "link": "https://docs.meilisearch.com/errors#invalid_search_facets" } "###); // Can't make the `attributes_to_highlight` fail with a get search since it'll accept anything as an array of strings. @@ -336,7 +336,7 @@ async fn search_non_filterable_facets() { "message": "Invalid facet distribution, the fields `doggo` are not set as filterable.", "code": "invalid_search_facets", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-facets" + "link": "https://docs.meilisearch.com/errors#invalid_search_facets" } "###); @@ -347,7 +347,7 @@ async fn search_non_filterable_facets() { "message": "Invalid facet distribution, the fields `doggo` are not set as filterable.", "code": "invalid_search_facets", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-facets" + "link": "https://docs.meilisearch.com/errors#invalid_search_facets" } "###); } @@ -364,7 +364,7 @@ async fn search_bad_highlight_pre_tag() { "message": "Invalid value type at `.highlightPreTag`: expected a string, but found an array: `[\"doggo\"]`", "code": "invalid_search_highlight_pre_tag", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-highlight-pre-tag" + "link": "https://docs.meilisearch.com/errors#invalid_search_highlight_pre_tag" } "###); // Can't make the `highlight_pre_tag` fail with a get search since it'll accept anything as a strings. @@ -382,7 +382,7 @@ async fn search_bad_highlight_post_tag() { "message": "Invalid value type at `.highlightPostTag`: expected a string, but found an array: `[\"doggo\"]`", "code": "invalid_search_highlight_post_tag", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-highlight-post-tag" + "link": "https://docs.meilisearch.com/errors#invalid_search_highlight_post_tag" } "###); // Can't make the `highlight_post_tag` fail with a get search since it'll accept anything as a strings. @@ -400,7 +400,7 @@ async fn search_bad_crop_marker() { "message": "Invalid value type at `.cropMarker`: expected a string, but found an array: `[\"doggo\"]`", "code": "invalid_search_crop_marker", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-crop-marker" + "link": "https://docs.meilisearch.com/errors#invalid_search_crop_marker" } "###); // Can't make the `crop_marker` fail with a get search since it'll accept anything as a strings. @@ -418,7 +418,7 @@ async fn search_bad_matching_strategy() { "message": "Unknown value `doggo` at `.matchingStrategy`: expected one of `last`, `all`", "code": "invalid_search_matching_strategy", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-matching-strategy" + "link": "https://docs.meilisearch.com/errors#invalid_search_matching_strategy" } "###); @@ -429,7 +429,7 @@ async fn search_bad_matching_strategy() { "message": "Unknown value `doggo` for parameter `matchingStrategy`: expected one of `last`, `all`", "code": "invalid_search_matching_strategy", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-matching-strategy" + "link": "https://docs.meilisearch.com/errors#invalid_search_matching_strategy" } "###); } @@ -449,7 +449,7 @@ async fn filter_invalid_syntax_object() { "message": "Was expecting an operation `=`, `!=`, `>=`, `>`, `<=`, `<`, `IN`, `NOT IN`, `TO`, `EXISTS`, `NOT EXISTS`, or `_geoRadius` at `title & Glass`.\n1:14 title & Glass", "code": "invalid_search_filter", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-filter" + "link": "https://docs.meilisearch.com/errors#invalid_search_filter" }); index .search(json!({"filter": "title & Glass"}), |response, code| { @@ -474,7 +474,7 @@ async fn filter_invalid_syntax_array() { "message": "Was expecting an operation `=`, `!=`, `>=`, `>`, `<=`, `<`, `IN`, `NOT IN`, `TO`, `EXISTS`, `NOT EXISTS`, or `_geoRadius` at `title & Glass`.\n1:14 title & Glass", "code": "invalid_search_filter", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-filter" + "link": "https://docs.meilisearch.com/errors#invalid_search_filter" }); index .search(json!({"filter": ["title & Glass"]}), |response, code| { @@ -499,7 +499,7 @@ async fn filter_invalid_syntax_string() { "message": "Found unexpected characters at the end of the filter: `XOR title = Glass`. You probably forgot an `OR` or an `AND` rule.\n15:32 title = Glass XOR title = Glass", "code": "invalid_search_filter", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-filter" + "link": "https://docs.meilisearch.com/errors#invalid_search_filter" }); index .search(json!({"filter": "title = Glass XOR title = Glass"}), |response, code| { @@ -524,7 +524,7 @@ async fn filter_invalid_attribute_array() { "message": "Attribute `many` is not filterable. Available filterable attributes are: `title`.\n1:5 many = Glass", "code": "invalid_search_filter", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-filter" + "link": "https://docs.meilisearch.com/errors#invalid_search_filter" }); index .search(json!({"filter": ["many = Glass"]}), |response, code| { @@ -549,7 +549,7 @@ async fn filter_invalid_attribute_string() { "message": "Attribute `many` is not filterable. Available filterable attributes are: `title`.\n1:5 many = Glass", "code": "invalid_search_filter", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-filter" + "link": "https://docs.meilisearch.com/errors#invalid_search_filter" }); index .search(json!({"filter": "many = Glass"}), |response, code| { @@ -574,7 +574,7 @@ async fn filter_reserved_geo_attribute_array() { "message": "`_geo` is a reserved keyword and thus can't be used as a filter expression. Use the _geoRadius(latitude, longitude, distance) built-in rule to filter on _geo field coordinates.\n1:5 _geo = Glass", "code": "invalid_search_filter", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-filter" + "link": "https://docs.meilisearch.com/errors#invalid_search_filter" }); index .search(json!({"filter": ["_geo = Glass"]}), |response, code| { @@ -599,7 +599,7 @@ async fn filter_reserved_geo_attribute_string() { "message": "`_geo` is a reserved keyword and thus can't be used as a filter expression. Use the _geoRadius(latitude, longitude, distance) built-in rule to filter on _geo field coordinates.\n1:5 _geo = Glass", "code": "invalid_search_filter", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-filter" + "link": "https://docs.meilisearch.com/errors#invalid_search_filter" }); index .search(json!({"filter": "_geo = Glass"}), |response, code| { @@ -624,7 +624,7 @@ async fn filter_reserved_attribute_array() { "message": "`_geoDistance` is a reserved keyword and thus can't be used as a filter expression.\n1:13 _geoDistance = Glass", "code": "invalid_search_filter", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-filter" + "link": "https://docs.meilisearch.com/errors#invalid_search_filter" }); index .search(json!({"filter": ["_geoDistance = Glass"]}), |response, code| { @@ -649,7 +649,7 @@ async fn filter_reserved_attribute_string() { "message": "`_geoDistance` is a reserved keyword and thus can't be used as a filter expression.\n1:13 _geoDistance = Glass", "code": "invalid_search_filter", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-filter" + "link": "https://docs.meilisearch.com/errors#invalid_search_filter" }); index .search(json!({"filter": "_geoDistance = Glass"}), |response, code| { @@ -674,7 +674,7 @@ async fn sort_geo_reserved_attribute() { "message": "`_geo` is a reserved keyword and thus can't be used as a sort expression. Use the _geoPoint(latitude, longitude) built-in rule to sort on _geo field coordinates.", "code": "invalid_search_sort", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-sort" + "link": "https://docs.meilisearch.com/errors#invalid_search_sort" }); index .search( @@ -704,7 +704,7 @@ async fn sort_reserved_attribute() { "message": "`_geoDistance` is a reserved keyword and thus can't be used as a sort expression.", "code": "invalid_search_sort", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-sort" + "link": "https://docs.meilisearch.com/errors#invalid_search_sort" }); index .search( @@ -734,7 +734,7 @@ async fn sort_unsortable_attribute() { "message": "Attribute `title` is not sortable. Available sortable attributes are: `id`.", "code": "invalid_search_sort", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-sort" + "link": "https://docs.meilisearch.com/errors#invalid_search_sort" }); index .search( @@ -764,7 +764,7 @@ async fn sort_invalid_syntax() { "message": "Invalid syntax for the sort parameter: expected expression ending by `:asc` or `:desc`, found `title`.", "code": "invalid_search_sort", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-sort" + "link": "https://docs.meilisearch.com/errors#invalid_search_sort" }); index .search( @@ -798,7 +798,7 @@ async fn sort_unset_ranking_rule() { "message": "The sort ranking rule must be specified in the ranking rules settings to use the sort parameter at search time.", "code": "invalid_search_sort", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-search-sort" + "link": "https://docs.meilisearch.com/errors#invalid_search_sort" }); index .search( diff --git a/meilisearch/tests/settings/errors.rs b/meilisearch/tests/settings/errors.rs index b4bdb27ca..52dadcf98 100644 --- a/meilisearch/tests/settings/errors.rs +++ b/meilisearch/tests/settings/errors.rs @@ -15,7 +15,7 @@ async fn settings_bad_displayed_attributes() { "message": "Invalid value type at `.displayedAttributes`: expected an array, but found a string: `\"doggo\"`", "code": "invalid_settings_displayed_attributes", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-displayed-attributes" + "link": "https://docs.meilisearch.com/errors#invalid_settings_displayed_attributes" } "###); @@ -26,7 +26,7 @@ async fn settings_bad_displayed_attributes() { "message": "Invalid value type: expected an array, but found a string: `\"doggo\"`", "code": "invalid_settings_displayed_attributes", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-displayed-attributes" + "link": "https://docs.meilisearch.com/errors#invalid_settings_displayed_attributes" } "###); } @@ -43,7 +43,7 @@ async fn settings_bad_searchable_attributes() { "message": "Invalid value type at `.searchableAttributes`: expected an array, but found a string: `\"doggo\"`", "code": "invalid_settings_searchable_attributes", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-searchable-attributes" + "link": "https://docs.meilisearch.com/errors#invalid_settings_searchable_attributes" } "###); @@ -54,7 +54,7 @@ async fn settings_bad_searchable_attributes() { "message": "Invalid value type: expected an array, but found a string: `\"doggo\"`", "code": "invalid_settings_searchable_attributes", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-searchable-attributes" + "link": "https://docs.meilisearch.com/errors#invalid_settings_searchable_attributes" } "###); } @@ -71,7 +71,7 @@ async fn settings_bad_filterable_attributes() { "message": "Invalid value type at `.filterableAttributes`: expected an array, but found a string: `\"doggo\"`", "code": "invalid_settings_filterable_attributes", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-filterable-attributes" + "link": "https://docs.meilisearch.com/errors#invalid_settings_filterable_attributes" } "###); @@ -82,7 +82,7 @@ async fn settings_bad_filterable_attributes() { "message": "Invalid value type: expected an array, but found a string: `\"doggo\"`", "code": "invalid_settings_filterable_attributes", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-filterable-attributes" + "link": "https://docs.meilisearch.com/errors#invalid_settings_filterable_attributes" } "###); } @@ -99,7 +99,7 @@ async fn settings_bad_sortable_attributes() { "message": "Invalid value type at `.sortableAttributes`: expected an array, but found a string: `\"doggo\"`", "code": "invalid_settings_sortable_attributes", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-sortable-attributes" + "link": "https://docs.meilisearch.com/errors#invalid_settings_sortable_attributes" } "###); @@ -110,7 +110,7 @@ async fn settings_bad_sortable_attributes() { "message": "Invalid value type: expected an array, but found a string: `\"doggo\"`", "code": "invalid_settings_sortable_attributes", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-sortable-attributes" + "link": "https://docs.meilisearch.com/errors#invalid_settings_sortable_attributes" } "###); } @@ -127,7 +127,7 @@ async fn settings_bad_ranking_rules() { "message": "Invalid value type at `.rankingRules`: expected an array, but found a string: `\"doggo\"`", "code": "invalid_settings_ranking_rules", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-ranking-rules" + "link": "https://docs.meilisearch.com/errors#invalid_settings_ranking_rules" } "###); @@ -138,7 +138,7 @@ async fn settings_bad_ranking_rules() { "message": "Invalid value type: expected an array, but found a string: `\"doggo\"`", "code": "invalid_settings_ranking_rules", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-ranking-rules" + "link": "https://docs.meilisearch.com/errors#invalid_settings_ranking_rules" } "###); } @@ -155,7 +155,7 @@ async fn settings_bad_stop_words() { "message": "Invalid value type at `.stopWords`: expected an array, but found a string: `\"doggo\"`", "code": "invalid_settings_stop_words", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-stop-words" + "link": "https://docs.meilisearch.com/errors#invalid_settings_stop_words" } "###); @@ -166,7 +166,7 @@ async fn settings_bad_stop_words() { "message": "Invalid value type: expected an array, but found a string: `\"doggo\"`", "code": "invalid_settings_stop_words", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-stop-words" + "link": "https://docs.meilisearch.com/errors#invalid_settings_stop_words" } "###); } @@ -183,7 +183,7 @@ async fn settings_bad_synonyms() { "message": "Invalid value type at `.synonyms`: expected an object, but found a string: `\"doggo\"`", "code": "invalid_settings_synonyms", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-synonyms" + "link": "https://docs.meilisearch.com/errors#invalid_settings_synonyms" } "###); @@ -194,7 +194,7 @@ async fn settings_bad_synonyms() { "message": "Invalid value type: expected an object, but found a string: `\"doggo\"`", "code": "invalid_settings_synonyms", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-synonyms" + "link": "https://docs.meilisearch.com/errors#invalid_settings_synonyms" } "###); } @@ -211,7 +211,7 @@ async fn settings_bad_distinct_attribute() { "message": "Invalid value type at `.distinctAttribute`: expected a string, but found an array: `[\"doggo\"]`", "code": "invalid_settings_distinct_attribute", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-distinct-attribute" + "link": "https://docs.meilisearch.com/errors#invalid_settings_distinct_attribute" } "###); @@ -222,7 +222,7 @@ async fn settings_bad_distinct_attribute() { "message": "Invalid value type: expected a string, but found an array: `[\"doggo\"]`", "code": "invalid_settings_distinct_attribute", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-distinct-attribute" + "link": "https://docs.meilisearch.com/errors#invalid_settings_distinct_attribute" } "###); } @@ -239,7 +239,7 @@ async fn settings_bad_typo_tolerance() { "message": "Invalid value type at `.typoTolerance`: expected an object, but found a string: `\"doggo\"`", "code": "invalid_settings_typo_tolerance", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-typo-tolerance" + "link": "https://docs.meilisearch.com/errors#invalid_settings_typo_tolerance" } "###); @@ -251,7 +251,7 @@ async fn settings_bad_typo_tolerance() { "message": "Invalid value type at `.typoTolerance.minWordSizeForTypos`: expected an object, but found a string: `\"doggo\"`", "code": "invalid_settings_typo_tolerance", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-typo-tolerance" + "link": "https://docs.meilisearch.com/errors#invalid_settings_typo_tolerance" } "###); @@ -262,7 +262,7 @@ async fn settings_bad_typo_tolerance() { "message": "Invalid value type: expected an object, but found a string: `\"doggo\"`", "code": "invalid_settings_typo_tolerance", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-typo-tolerance" + "link": "https://docs.meilisearch.com/errors#invalid_settings_typo_tolerance" } "###); @@ -277,7 +277,7 @@ async fn settings_bad_typo_tolerance() { "message": "Unknown field `typoTolerance`: expected one of `enabled`, `minWordSizeForTypos`, `disableOnWords`, `disableOnAttributes`", "code": "invalid_settings_typo_tolerance", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-typo-tolerance" + "link": "https://docs.meilisearch.com/errors#invalid_settings_typo_tolerance" } "###); } @@ -294,7 +294,7 @@ async fn settings_bad_faceting() { "message": "Invalid value type at `.faceting`: expected an object, but found a string: `\"doggo\"`", "code": "invalid_settings_faceting", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-faceting" + "link": "https://docs.meilisearch.com/errors#invalid_settings_faceting" } "###); @@ -305,7 +305,7 @@ async fn settings_bad_faceting() { "message": "Invalid value type: expected an object, but found a string: `\"doggo\"`", "code": "invalid_settings_faceting", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-faceting" + "link": "https://docs.meilisearch.com/errors#invalid_settings_faceting" } "###); } @@ -322,7 +322,7 @@ async fn settings_bad_pagination() { "message": "Invalid value type at `.pagination`: expected an object, but found a string: `\"doggo\"`", "code": "invalid_settings_pagination", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-pagination" + "link": "https://docs.meilisearch.com/errors#invalid_settings_pagination" } "###); @@ -333,7 +333,7 @@ async fn settings_bad_pagination() { "message": "Invalid value type: expected an object, but found a string: `\"doggo\"`", "code": "invalid_settings_pagination", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-pagination" + "link": "https://docs.meilisearch.com/errors#invalid_settings_pagination" } "###); } diff --git a/meilisearch/tests/settings/get_settings.rs b/meilisearch/tests/settings/get_settings.rs index f18787e19..88e395b57 100644 --- a/meilisearch/tests/settings/get_settings.rs +++ b/meilisearch/tests/settings/get_settings.rs @@ -185,7 +185,7 @@ async fn error_update_setting_unexisting_index_invalid_uid() { "message": "`test##! ` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).", "code": "invalid_index_uid", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-index-uid" + "link": "https://docs.meilisearch.com/errors#invalid_index_uid" } "###); } @@ -285,7 +285,7 @@ async fn error_set_invalid_ranking_rules() { "message": "Invalid value at `.rankingRules[0]`: `manyTheFish` ranking rule is invalid. Valid ranking rules are words, typo, sort, proximity, attribute, exactness and custom ranking rules.", "code": "invalid_settings_ranking_rules", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-ranking-rules" + "link": "https://docs.meilisearch.com/errors#invalid_settings_ranking_rules" } "###); } diff --git a/meilisearch/tests/swap_indexes/errors.rs b/meilisearch/tests/swap_indexes/errors.rs index 848f347f8..03625fd08 100644 --- a/meilisearch/tests/swap_indexes/errors.rs +++ b/meilisearch/tests/swap_indexes/errors.rs @@ -14,7 +14,7 @@ async fn swap_indexes_bad_format() { "message": "Invalid value type: expected an array, but found a string: `\"doggo\"`", "code": "bad_request", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#bad-request" + "link": "https://docs.meilisearch.com/errors#bad_request" } "###); @@ -25,7 +25,7 @@ async fn swap_indexes_bad_format() { "message": "Invalid value type at `[0]`: expected an object, but found a string: `\"doggo\"`", "code": "bad_request", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#bad-request" + "link": "https://docs.meilisearch.com/errors#bad_request" } "###); } @@ -41,7 +41,7 @@ async fn swap_indexes_bad_indexes() { "message": "Invalid value type at `[0].indexes`: expected an array, but found a string: `\"doggo\"`", "code": "invalid_swap_indexes", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-swap-indexes" + "link": "https://docs.meilisearch.com/errors#invalid_swap_indexes" } "###); @@ -52,7 +52,7 @@ async fn swap_indexes_bad_indexes() { "message": "Two indexes must be given for each swap. The list `[\"doggo\"]` contains 1 indexes.", "code": "invalid_swap_indexes", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-swap-indexes" + "link": "https://docs.meilisearch.com/errors#invalid_swap_indexes" } "###); @@ -64,7 +64,7 @@ async fn swap_indexes_bad_indexes() { "message": "Two indexes must be given for each swap. The list `[\"doggo\", \"crabo\", \"croco\"]` contains 3 indexes.", "code": "invalid_swap_indexes", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-swap-indexes" + "link": "https://docs.meilisearch.com/errors#invalid_swap_indexes" } "###); @@ -75,7 +75,7 @@ async fn swap_indexes_bad_indexes() { "message": "Indexes must be declared only once during a swap. `doggo` was specified several times.", "code": "invalid_swap_duplicate_index_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-swap-duplicate-index-found" + "link": "https://docs.meilisearch.com/errors#invalid_swap_duplicate_index_found" } "###); @@ -88,7 +88,7 @@ async fn swap_indexes_bad_indexes() { "message": "Indexes must be declared only once during a swap. `doggo` was specified several times.", "code": "invalid_swap_duplicate_index_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-swap-duplicate-index-found" + "link": "https://docs.meilisearch.com/errors#invalid_swap_duplicate_index_found" } "###); } diff --git a/meilisearch/tests/tasks/errors.rs b/meilisearch/tests/tasks/errors.rs index a15c0eca0..830c4c8e7 100644 --- a/meilisearch/tests/tasks/errors.rs +++ b/meilisearch/tests/tasks/errors.rs @@ -13,7 +13,7 @@ async fn task_bad_uids() { "message": "Invalid value in parameter `uids`: could not parse `doggo` as a positive integer", "code": "invalid_task_uids", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-uids" + "link": "https://docs.meilisearch.com/errors#invalid_task_uids" } "###); @@ -24,7 +24,7 @@ async fn task_bad_uids() { "message": "Invalid value in parameter `uids`: could not parse `doggo` as a positive integer", "code": "invalid_task_uids", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-uids" + "link": "https://docs.meilisearch.com/errors#invalid_task_uids" } "###); @@ -35,7 +35,7 @@ async fn task_bad_uids() { "message": "Invalid value in parameter `uids`: could not parse `doggo` as a positive integer", "code": "invalid_task_uids", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-uids" + "link": "https://docs.meilisearch.com/errors#invalid_task_uids" } "###); @@ -46,7 +46,7 @@ async fn task_bad_uids() { "message": "Invalid value in parameter `uids[1]`: could not parse `dogo` as a positive integer", "code": "invalid_task_uids", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-uids" + "link": "https://docs.meilisearch.com/errors#invalid_task_uids" } "###); } @@ -62,7 +62,7 @@ async fn task_bad_canceled_by() { "message": "Invalid value in parameter `canceledBy`: could not parse `doggo` as a positive integer", "code": "invalid_task_canceled_by", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-canceled-by" + "link": "https://docs.meilisearch.com/errors#invalid_task_canceled_by" } "###); @@ -73,7 +73,7 @@ async fn task_bad_canceled_by() { "message": "Invalid value in parameter `canceledBy`: could not parse `doggo` as a positive integer", "code": "invalid_task_canceled_by", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-canceled-by" + "link": "https://docs.meilisearch.com/errors#invalid_task_canceled_by" } "###); @@ -84,7 +84,7 @@ async fn task_bad_canceled_by() { "message": "Invalid value in parameter `canceledBy`: could not parse `doggo` as a positive integer", "code": "invalid_task_canceled_by", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-canceled-by" + "link": "https://docs.meilisearch.com/errors#invalid_task_canceled_by" } "###); } @@ -100,7 +100,7 @@ async fn task_bad_types() { "message": "Invalid value in parameter `types`: `doggo` is not a valid task type. Available types are `documentAdditionOrUpdate`, `documentDeletion`, `settingsUpdate`, `indexCreation`, `indexDeletion`, `indexUpdate`, `indexSwap`, `taskCancelation`, `taskDeletion`, `dumpCreation`, `snapshotCreation`.", "code": "invalid_task_types", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-types" + "link": "https://docs.meilisearch.com/errors#invalid_task_types" } "###); @@ -111,7 +111,7 @@ async fn task_bad_types() { "message": "Invalid value in parameter `types`: `doggo` is not a valid task type. Available types are `documentAdditionOrUpdate`, `documentDeletion`, `settingsUpdate`, `indexCreation`, `indexDeletion`, `indexUpdate`, `indexSwap`, `taskCancelation`, `taskDeletion`, `dumpCreation`, `snapshotCreation`.", "code": "invalid_task_types", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-types" + "link": "https://docs.meilisearch.com/errors#invalid_task_types" } "###); @@ -122,7 +122,7 @@ async fn task_bad_types() { "message": "Invalid value in parameter `types`: `doggo` is not a valid task type. Available types are `documentAdditionOrUpdate`, `documentDeletion`, `settingsUpdate`, `indexCreation`, `indexDeletion`, `indexUpdate`, `indexSwap`, `taskCancelation`, `taskDeletion`, `dumpCreation`, `snapshotCreation`.", "code": "invalid_task_types", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-types" + "link": "https://docs.meilisearch.com/errors#invalid_task_types" } "###); } @@ -138,7 +138,7 @@ async fn task_bad_statuses() { "message": "Invalid value in parameter `statuses`: `doggo` is not a valid task status. Available statuses are `enqueued`, `processing`, `succeeded`, `failed`, `canceled`.", "code": "invalid_task_statuses", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-statuses" + "link": "https://docs.meilisearch.com/errors#invalid_task_statuses" } "###); @@ -149,7 +149,7 @@ async fn task_bad_statuses() { "message": "Invalid value in parameter `statuses`: `doggo` is not a valid task status. Available statuses are `enqueued`, `processing`, `succeeded`, `failed`, `canceled`.", "code": "invalid_task_statuses", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-statuses" + "link": "https://docs.meilisearch.com/errors#invalid_task_statuses" } "###); @@ -160,7 +160,7 @@ async fn task_bad_statuses() { "message": "Invalid value in parameter `statuses`: `doggo` is not a valid task status. Available statuses are `enqueued`, `processing`, `succeeded`, `failed`, `canceled`.", "code": "invalid_task_statuses", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-statuses" + "link": "https://docs.meilisearch.com/errors#invalid_task_statuses" } "###); } @@ -176,7 +176,7 @@ async fn task_bad_index_uids() { "message": "Invalid value in parameter `indexUids`: `the good doggo` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).", "code": "invalid_index_uid", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-index-uid" + "link": "https://docs.meilisearch.com/errors#invalid_index_uid" } "###); @@ -187,7 +187,7 @@ async fn task_bad_index_uids() { "message": "Invalid value in parameter `indexUids`: `the good doggo` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).", "code": "invalid_index_uid", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-index-uid" + "link": "https://docs.meilisearch.com/errors#invalid_index_uid" } "###); @@ -198,7 +198,7 @@ async fn task_bad_index_uids() { "message": "Invalid value in parameter `indexUids`: `the good doggo` is not a valid index uid. Index uid can be an integer or a string containing only alphanumeric characters, hyphens (-) and underscores (_).", "code": "invalid_index_uid", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-index-uid" + "link": "https://docs.meilisearch.com/errors#invalid_index_uid" } "###); } @@ -214,7 +214,7 @@ async fn task_bad_limit() { "message": "Invalid value in parameter `limit`: could not parse `doggo` as a positive integer", "code": "invalid_task_limit", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-limit" + "link": "https://docs.meilisearch.com/errors#invalid_task_limit" } "###); @@ -225,7 +225,7 @@ async fn task_bad_limit() { "message": "Unknown parameter `limit`: expected one of `uids`, `canceledBy`, `types`, `statuses`, `indexUids`, `afterEnqueuedAt`, `beforeEnqueuedAt`, `afterStartedAt`, `beforeStartedAt`, `afterFinishedAt`, `beforeFinishedAt`", "code": "bad_request", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#bad-request" + "link": "https://docs.meilisearch.com/errors#bad_request" } "###); @@ -236,7 +236,7 @@ async fn task_bad_limit() { "message": "Unknown parameter `limit`: expected one of `uids`, `canceledBy`, `types`, `statuses`, `indexUids`, `afterEnqueuedAt`, `beforeEnqueuedAt`, `afterStartedAt`, `beforeStartedAt`, `afterFinishedAt`, `beforeFinishedAt`", "code": "bad_request", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#bad-request" + "link": "https://docs.meilisearch.com/errors#bad_request" } "###); } @@ -252,7 +252,7 @@ async fn task_bad_from() { "message": "Invalid value in parameter `from`: could not parse `doggo` as a positive integer", "code": "invalid_task_from", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-from" + "link": "https://docs.meilisearch.com/errors#invalid_task_from" } "###); @@ -263,7 +263,7 @@ async fn task_bad_from() { "message": "Unknown parameter `from`: expected one of `uids`, `canceledBy`, `types`, `statuses`, `indexUids`, `afterEnqueuedAt`, `beforeEnqueuedAt`, `afterStartedAt`, `beforeStartedAt`, `afterFinishedAt`, `beforeFinishedAt`", "code": "bad_request", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#bad-request" + "link": "https://docs.meilisearch.com/errors#bad_request" } "###); @@ -274,7 +274,7 @@ async fn task_bad_from() { "message": "Unknown parameter `from`: expected one of `uids`, `canceledBy`, `types`, `statuses`, `indexUids`, `afterEnqueuedAt`, `beforeEnqueuedAt`, `afterStartedAt`, `beforeStartedAt`, `afterFinishedAt`, `beforeFinishedAt`", "code": "bad_request", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#bad-request" + "link": "https://docs.meilisearch.com/errors#bad_request" } "###); } @@ -290,7 +290,7 @@ async fn task_bad_after_enqueued_at() { "message": "Invalid value in parameter `afterEnqueuedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_after_enqueued_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-after-enqueued-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_after_enqueued_at" } "###); @@ -301,7 +301,7 @@ async fn task_bad_after_enqueued_at() { "message": "Invalid value in parameter `afterEnqueuedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_after_enqueued_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-after-enqueued-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_after_enqueued_at" } "###); @@ -312,7 +312,7 @@ async fn task_bad_after_enqueued_at() { "message": "Invalid value in parameter `afterEnqueuedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_after_enqueued_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-after-enqueued-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_after_enqueued_at" } "###); } @@ -328,7 +328,7 @@ async fn task_bad_before_enqueued_at() { "message": "Invalid value in parameter `beforeEnqueuedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_before_enqueued_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-before-enqueued-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_before_enqueued_at" } "###); @@ -339,7 +339,7 @@ async fn task_bad_before_enqueued_at() { "message": "Invalid value in parameter `beforeEnqueuedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_before_enqueued_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-before-enqueued-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_before_enqueued_at" } "###); @@ -350,7 +350,7 @@ async fn task_bad_before_enqueued_at() { "message": "Invalid value in parameter `beforeEnqueuedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_before_enqueued_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-before-enqueued-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_before_enqueued_at" } "###); } @@ -366,7 +366,7 @@ async fn task_bad_after_started_at() { "message": "Invalid value in parameter `afterStartedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_after_started_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-after-started-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_after_started_at" } "###); @@ -377,7 +377,7 @@ async fn task_bad_after_started_at() { "message": "Invalid value in parameter `afterStartedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_after_started_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-after-started-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_after_started_at" } "###); @@ -388,7 +388,7 @@ async fn task_bad_after_started_at() { "message": "Invalid value in parameter `afterStartedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_after_started_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-after-started-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_after_started_at" } "###); } @@ -404,7 +404,7 @@ async fn task_bad_before_started_at() { "message": "Invalid value in parameter `beforeStartedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_before_started_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-before-started-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_before_started_at" } "###); @@ -415,7 +415,7 @@ async fn task_bad_before_started_at() { "message": "Invalid value in parameter `beforeStartedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_before_started_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-before-started-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_before_started_at" } "###); @@ -426,7 +426,7 @@ async fn task_bad_before_started_at() { "message": "Invalid value in parameter `beforeStartedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_before_started_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-before-started-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_before_started_at" } "###); } @@ -442,7 +442,7 @@ async fn task_bad_after_finished_at() { "message": "Invalid value in parameter `afterFinishedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_after_finished_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-after-finished-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_after_finished_at" } "###); @@ -453,7 +453,7 @@ async fn task_bad_after_finished_at() { "message": "Invalid value in parameter `afterFinishedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_after_finished_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-after-finished-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_after_finished_at" } "###); @@ -464,7 +464,7 @@ async fn task_bad_after_finished_at() { "message": "Invalid value in parameter `afterFinishedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_after_finished_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-after-finished-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_after_finished_at" } "###); } @@ -480,7 +480,7 @@ async fn task_bad_before_finished_at() { "message": "Invalid value in parameter `beforeFinishedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_before_finished_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-before-finished-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_before_finished_at" } "###); @@ -491,7 +491,7 @@ async fn task_bad_before_finished_at() { "message": "Invalid value in parameter `beforeFinishedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_before_finished_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-before-finished-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_before_finished_at" } "###); @@ -502,7 +502,7 @@ async fn task_bad_before_finished_at() { "message": "Invalid value in parameter `beforeFinishedAt`: `doggo` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_before_finished_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-before-finished-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_before_finished_at" } "###); } diff --git a/meilisearch/tests/tasks/mod.rs b/meilisearch/tests/tasks/mod.rs index 361ac1083..e9b5a2325 100644 --- a/meilisearch/tests/tasks/mod.rs +++ b/meilisearch/tests/tasks/mod.rs @@ -19,7 +19,7 @@ async fn error_get_unexisting_task_status() { "message": "Task `1` not found.", "code": "task_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#task-not-found" + "link": "https://docs.meilisearch.com/errors#task_not_found" }); assert_eq!(response, expected_response); @@ -202,7 +202,7 @@ async fn get_task_filter_error() { "message": "Unknown parameter `lol`: expected one of `limit`, `from`, `uids`, `canceledBy`, `types`, `statuses`, `indexUids`, `afterEnqueuedAt`, `beforeEnqueuedAt`, `afterStartedAt`, `beforeStartedAt`, `afterFinishedAt`, `beforeFinishedAt`", "code": "bad_request", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#bad-request" + "link": "https://docs.meilisearch.com/errors#bad_request" } "###); @@ -213,7 +213,7 @@ async fn get_task_filter_error() { "message": "Invalid value in parameter `uids`: could not parse `pied` as a positive integer", "code": "invalid_task_uids", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-uids" + "link": "https://docs.meilisearch.com/errors#invalid_task_uids" } "###); @@ -224,7 +224,7 @@ async fn get_task_filter_error() { "message": "Invalid value in parameter `from`: could not parse `pied` as a positive integer", "code": "invalid_task_from", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-from" + "link": "https://docs.meilisearch.com/errors#invalid_task_from" } "###); @@ -235,7 +235,7 @@ async fn get_task_filter_error() { "message": "Invalid value in parameter `beforeStartedAt`: `pied` is an invalid date-time. It should follow the YYYY-MM-DD or RFC 3339 date-time format.", "code": "invalid_task_before_started_at", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-before-started-at" + "link": "https://docs.meilisearch.com/errors#invalid_task_before_started_at" } "###); } @@ -251,7 +251,7 @@ async fn delete_task_filter_error() { "message": "Query parameters to filter the tasks to delete are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.", "code": "missing_task_filters", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#missing-task-filters" + "link": "https://docs.meilisearch.com/errors#missing_task_filters" } "###); @@ -262,7 +262,7 @@ async fn delete_task_filter_error() { "message": "Unknown parameter `lol`: expected one of `uids`, `canceledBy`, `types`, `statuses`, `indexUids`, `afterEnqueuedAt`, `beforeEnqueuedAt`, `afterStartedAt`, `beforeStartedAt`, `afterFinishedAt`, `beforeFinishedAt`", "code": "bad_request", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#bad-request" + "link": "https://docs.meilisearch.com/errors#bad_request" } "###); @@ -273,7 +273,7 @@ async fn delete_task_filter_error() { "message": "Invalid value in parameter `uids`: could not parse `pied` as a positive integer", "code": "invalid_task_uids", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-uids" + "link": "https://docs.meilisearch.com/errors#invalid_task_uids" } "###); } @@ -289,7 +289,7 @@ async fn cancel_task_filter_error() { "message": "Query parameters to filter the tasks to cancel are missing. Available query parameters are: `uids`, `indexUids`, `statuses`, `types`, `canceledBy`, `beforeEnqueuedAt`, `afterEnqueuedAt`, `beforeStartedAt`, `afterStartedAt`, `beforeFinishedAt`, `afterFinishedAt`.", "code": "missing_task_filters", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#missing-task-filters" + "link": "https://docs.meilisearch.com/errors#missing_task_filters" } "###); @@ -300,7 +300,7 @@ async fn cancel_task_filter_error() { "message": "Unknown parameter `lol`: expected one of `uids`, `canceledBy`, `types`, `statuses`, `indexUids`, `afterEnqueuedAt`, `beforeEnqueuedAt`, `afterStartedAt`, `beforeStartedAt`, `afterFinishedAt`, `beforeFinishedAt`", "code": "bad_request", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#bad-request" + "link": "https://docs.meilisearch.com/errors#bad_request" } "###); @@ -311,7 +311,7 @@ async fn cancel_task_filter_error() { "message": "Invalid value in parameter `uids`: could not parse `pied` as a positive integer", "code": "invalid_task_uids", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-task-uids" + "link": "https://docs.meilisearch.com/errors#invalid_task_uids" } "###); } @@ -366,7 +366,7 @@ async fn test_summarized_document_addition_or_update() { index.add_documents(json!({ "id": 42, "content": "doggos & fluff" }), None).await; index.wait_task(0).await; let (task, _) = index.get_task(0).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -390,7 +390,7 @@ async fn test_summarized_document_addition_or_update() { index.add_documents(json!({ "id": 42, "content": "doggos & fluff" }), Some("id")).await; index.wait_task(1).await; let (task, _) = index.get_task(1).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -419,7 +419,7 @@ async fn test_summarized_delete_batch() { index.delete_batch(vec![1, 2, 3]).await; index.wait_task(0).await; let (task, _) = index.get_task(0).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -436,7 +436,7 @@ async fn test_summarized_delete_batch() { "message": "Index `test` not found.", "code": "index_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-not-found" + "link": "https://docs.meilisearch.com/errors#index_not_found" }, "duration": "[duration]", "enqueuedAt": "[date]", @@ -449,7 +449,7 @@ async fn test_summarized_delete_batch() { index.delete_batch(vec![42]).await; index.wait_task(2).await; let (task, _) = index.get_task(2).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -478,7 +478,7 @@ async fn test_summarized_delete_document() { index.delete_document(1).await; index.wait_task(0).await; let (task, _) = index.get_task(0).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -495,7 +495,7 @@ async fn test_summarized_delete_document() { "message": "Index `test` not found.", "code": "index_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-not-found" + "link": "https://docs.meilisearch.com/errors#index_not_found" }, "duration": "[duration]", "enqueuedAt": "[date]", @@ -508,7 +508,7 @@ async fn test_summarized_delete_document() { index.delete_document(42).await; index.wait_task(2).await; let (task, _) = index.get_task(2).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -542,14 +542,14 @@ async fn test_summarized_settings_update() { "message": "Invalid value at `.rankingRules[0]`: `custom` ranking rule is invalid. Valid ranking rules are words, typo, sort, proximity, attribute, exactness and custom ranking rules.", "code": "invalid_settings_ranking_rules", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#invalid-settings-ranking-rules" + "link": "https://docs.meilisearch.com/errors#invalid_settings_ranking_rules" } "###); index.update_settings(json!({ "displayedAttributes": ["doggos", "name"], "filterableAttributes": ["age", "nb_paw_pads"], "sortableAttributes": ["iq"] })).await; index.wait_task(0).await; let (task, _) = index.get_task(0).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -587,7 +587,7 @@ async fn test_summarized_index_creation() { index.create(None).await; index.wait_task(0).await; let (task, _) = index.get_task(0).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -610,7 +610,7 @@ async fn test_summarized_index_creation() { index.create(Some("doggos")).await; index.wait_task(1).await; let (task, _) = index.get_task(1).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -626,7 +626,7 @@ async fn test_summarized_index_creation() { "message": "Index `test` already exists.", "code": "index_already_exists", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-already-exists" + "link": "https://docs.meilisearch.com/errors#index_already_exists" }, "duration": "[duration]", "enqueuedAt": "[date]", @@ -643,7 +643,7 @@ async fn test_summarized_index_deletion() { index.delete().await; index.wait_task(0).await; let (task, _) = index.get_task(0).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -659,7 +659,7 @@ async fn test_summarized_index_deletion() { "message": "Index `test` not found.", "code": "index_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-not-found" + "link": "https://docs.meilisearch.com/errors#index_not_found" }, "duration": "[duration]", "enqueuedAt": "[date]", @@ -673,7 +673,7 @@ async fn test_summarized_index_deletion() { index.delete().await; index.wait_task(2).await; let (task, _) = index.get_task(2).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -697,7 +697,7 @@ async fn test_summarized_index_deletion() { index.delete().await; index.wait_task(2).await; let (task, _) = index.get_task(2).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -726,7 +726,7 @@ async fn test_summarized_index_update() { index.update(None).await; index.wait_task(0).await; let (task, _) = index.get_task(0).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -742,7 +742,7 @@ async fn test_summarized_index_update() { "message": "Index `test` not found.", "code": "index_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-not-found" + "link": "https://docs.meilisearch.com/errors#index_not_found" }, "duration": "[duration]", "enqueuedAt": "[date]", @@ -754,7 +754,7 @@ async fn test_summarized_index_update() { index.update(Some("bones")).await; index.wait_task(1).await; let (task, _) = index.get_task(1).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -770,7 +770,7 @@ async fn test_summarized_index_update() { "message": "Index `test` not found.", "code": "index_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-not-found" + "link": "https://docs.meilisearch.com/errors#index_not_found" }, "duration": "[duration]", "enqueuedAt": "[date]", @@ -785,7 +785,7 @@ async fn test_summarized_index_update() { index.update(None).await; index.wait_task(3).await; let (task, _) = index.get_task(3).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -808,7 +808,7 @@ async fn test_summarized_index_update() { index.update(Some("bones")).await; index.wait_task(4).await; let (task, _) = index.get_task(4).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -839,7 +839,7 @@ async fn test_summarized_index_swap() { .await; server.wait_task(0).await; let (task, _) = server.get_task(0).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -862,7 +862,7 @@ async fn test_summarized_index_swap() { "message": "Indexes `cattos`, `doggos` not found.", "code": "index_not_found", "type": "invalid_request", - "link": "https://docs.meilisearch.com/errors#index-not-found" + "link": "https://docs.meilisearch.com/errors#index_not_found" }, "duration": "[duration]", "enqueuedAt": "[date]", @@ -880,7 +880,7 @@ async fn test_summarized_index_swap() { .await; server.wait_task(3).await; let (task, _) = server.get_task(3).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -918,7 +918,7 @@ async fn test_summarized_task_cancelation() { server.cancel_tasks("uids=0").await; index.wait_task(1).await; let (task, _) = index.get_task(1).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -951,7 +951,7 @@ async fn test_summarized_task_deletion() { server.delete_tasks("uids=0").await; index.wait_task(1).await; let (task, _) = index.get_task(1).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" { @@ -980,7 +980,7 @@ async fn test_summarized_dump_creation() { server.create_dump().await; server.wait_task(0).await; let (task, _) = server.get_task(0).await; - assert_json_snapshot!(task, + assert_json_snapshot!(task, { ".details.dumpUid" => "[dumpUid]", ".duration" => "[duration]", ".enqueuedAt" => "[date]", ".startedAt" => "[date]", ".finishedAt" => "[date]" }, @r###" {