-
Notifications
You must be signed in to change notification settings - Fork 99
Update keys for v0.28.0 #313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…meilisearch-rust into update_http_methods_for_v0.28.0
…meilisearch-rust into update_http_methods_for_v0.28.0
…isearch/meilisearch-rust into update_http_methods_for_v0.28.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well Done! I really like the new way to handle the key 🏅
I just have some questions
@@ -6,20 +6,23 @@ use crate::{client::Client, errors::Error}; | |||
/// Represent a [meilisearch key](https://docs.meilisearch.com/reference/api/keys.html#returned-fields) | |||
/// You can get a [Key] from the [Client::get_key] method. | |||
/// Or you can create a [Key] with the [KeyBuilder::create] or [Client::create_key] methods. | |||
#[derive(Debug, Serialize, Deserialize)] | |||
#[derive(Debug, Serialize, Deserialize, Clone)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see where you made a copy or use Clone
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its to give the possibility to the user to copy if they'd like to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a lot of concerns about the test; I know it probably won’t cause any issue right now but I’m afraid they’ll become flaky after some time thus, most of my comments are to prevent this from happening.
Changes related to the
keys
managementRelated to:
/keys
ressources meilisearch#2442All the changes:
client.get_keys_with()
that lets you paginate onlimit
(default: 20),offset
(default: 0).get_keys_with
get_keys
orget_key
now returns an additional fielduid
.get_key
,delete_key
andupdate_key
accepts both the uid or the key itself as a selectorcreate_key
accepts a customuid
to generate a determinist API key. Ifnull
Meilisearch generates one. It must be a UUID v4 value.create_key
accepts a customname
.update_key
only accepts updates on the description and the nameget_keys_with
andget_keys
is now aKeysResults
instead ofVec<Key>
.Breaking
get_keys_with
get_keys
orget_key
now returns an additional fielduid
.get_keys_with
andget_keys
is now aKeysResults
instead ofVec<Key>
.get_keys
without filteringget_keys
with filteringResponse: