Replace underscores with hyphens in doc link to error code

This commit is contained in:
Loïc Lecrenier 2023-01-02 16:13:44 +01:00
parent db7eaf23f4
commit 2d74678b51
28 changed files with 174 additions and 159 deletions

View file

@ -176,7 +176,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);
@ -192,7 +192,7 @@ async fn error_create_with_invalid_index_uid() {
"message": "`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"
});
assert_eq!(response, expected_response);

View file

@ -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;

View file

@ -34,7 +34,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);
@ -190,7 +190,7 @@ async fn get_invalid_index_uid() {
"message": "Index `this is not a valid index name` 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"
})
);
}

View file

@ -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);

View file

@ -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);