Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions utoipa/src/openapi/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,19 @@ builder! {
/// See more details at <https://json-schema.org/understanding-json-schema/reference/non_json_data#contentmediatype>
#[serde(skip_serializing_if = "String::is_empty", default)]
pub content_media_type: String,

/// Specifies a single permissible value for this schema.
///
/// When present, the schema validates only if the instance equals this exact value.
/// This is typically used for discriminator properties in polymorphic schemas or
/// for fixed protocol fields.
///
/// Equivalent to a single-element `enum` but semantically indicates an immutable,
/// predetermined value rather than a choice among alternatives.
///
/// See more details at <https://spec.openapis.org/oas/v3.2.0.html#annotated-enumerations>
#[serde(rename = "const")]
pub const_: Option<String>,
}
}

Expand Down