Skip to content

Commit

Permalink
chore: move discriminator to right section
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Dec 29, 2024
1 parent d364fc3 commit adeb5f0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/oas3/src/spec/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,12 @@ pub struct ObjectSchema {
// #########################################################################

//
/// Discriminator for object selection based on propertyName
///
/// See <https://github.com/OAI/OpenAPI-Specification/blob/HEAD/versions/3.1.0.md#discriminator-object>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub discriminator: Option<Discriminator>,

/// A free-form property to include an example of an instance for this schema.
///
/// To represent examples that cannot be naturally represented in JSON or YAML, a string value
Expand Down Expand Up @@ -529,12 +535,6 @@ pub struct ObjectSchema {
/// See <https://github.com/OAI/OpenAPI-Specification/blob/HEAD/versions/3.1.0.md#specification-extensions>.
#[serde(flatten, with = "spec_extensions")]
pub extensions: BTreeMap<String, serde_json::Value>,

/// Discriminator for object selection based on propertyName
///
/// See <https://github.com/OAI/OpenAPI-Specification/blob/HEAD/versions/3.1.0.md#discriminator-object>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub discriminator: Option<Discriminator>,
}

impl ObjectSchema {
Expand Down

0 comments on commit adeb5f0

Please sign in to comment.