openapi-to-rust 0.3.0

Generate strongly-typed Rust structs, HTTP clients, and SSE streaming clients from OpenAPI 3.1 specifications
Documentation
---
source: src/test_helpers.rs
expression: "&generated_code"
---
//! Generated types from OpenAPI specification
//!
//! This file contains all the generated types for the API.
//! Do not edit manually - regenerate using the appropriate script.
#![allow(clippy::large_enum_variant)]
#![allow(clippy::format_in_format_args)]
#![allow(clippy::let_unit_value)]
#![allow(unreachable_patterns)]
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Deserialize, Serialize)]
#[serde(tag = "type")]
pub enum EventUnion {
    #[serde(rename = "response.reasoning_summary_part.added")]
    ReasoningSummaryPartAdded(ResponseReasoningSummaryPartAddedEvent),
    #[serde(rename = "response.reasoning_summary_part.done")]
    ReasoningSummaryPartDone(ResponseReasoningSummaryPartDoneEvent),
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct ResponseReasoningSummaryPartDoneEvent {
    pub part: ReasoningPart,
}
///The type of the event. Always `response.reasoning_summary_part.done`.
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum ResponseReasoningSummaryPartDoneEventType {
    #[default]
    #[serde(rename = "response.reasoning_summary_part.done")]
    ResponseReasoningSummaryPartDone,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct ResponseReasoningSummaryPartAddedEvent {
    pub part: ReasoningPart,
}
///The type of the event. Always `response.reasoning_summary_part.added`.
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum ResponseReasoningSummaryPartAddedEventType {
    #[default]
    #[serde(rename = "response.reasoning_summary_part.added")]
    ResponseReasoningSummaryPartAdded,
}
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct ReasoningPart {
    pub text: String,
    ///The type of the part. Always `summary_text`.
    pub r#type: ReasoningPartType,
}
///The type of the part. Always `summary_text`.
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, Default)]
pub enum ReasoningPartType {
    #[default]
    #[serde(rename = "summary_text")]
    SummaryText,
}