Update crates/meilisearch-types/src/settings.rs

Co-authored-by: Louis Dureuil <louis@meilisearch.com>
This commit is contained in:
Tamo 2025-01-07 16:31:39 +01:00 committed by GitHub
parent ae5a04e85c
commit a8ef6f08e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -147,6 +147,13 @@ impl MergeWithError<milli::CriterionError> for DeserrJsonError<InvalidSettingsRa
#[derive(Default, Serialize, Deserialize, PartialEq, Eq, Clone, ToSchema)] #[derive(Default, Serialize, Deserialize, PartialEq, Eq, Clone, ToSchema)]
#[repr(transparent)] #[repr(transparent)]
#[serde(transparent)] #[serde(transparent)]
/// "Technical" type that is required due to utoipa.
///
/// We did not find a way to implement [`utoipa::ToSchema`] for the [`Setting`] enum,
/// but most types can use the `value_type` macro parameter to workaround that issue.
///
/// However that type is used in the settings route, including through the macro that auto-generate
/// all the settings route, so we can't remap the `value_type`.
pub struct SettingEmbeddingSettings { pub struct SettingEmbeddingSettings {
#[schema(inline, value_type = Option<crate::milli::vector::settings::EmbeddingSettings>)] #[schema(inline, value_type = Option<crate::milli::vector::settings::EmbeddingSettings>)]
pub inner: Setting<crate::milli::vector::settings::EmbeddingSettings>, pub inner: Setting<crate::milli::vector::settings::EmbeddingSettings>,