pub enum SseSpecVersion {
V3_1,
V3_2,
}Expand description
OpenAPI spec version used to render Server-Sent Event (SSE) responses in the generated document.
The runtime layer (crate::SseStream, crate::SseEventMeta)
is version-agnostic — the only effect of this choice is the shape
of the text/event-stream response in the rendered OpenAPI JSON
and, with Self::V3_2, the document’s root openapi field.
| Variant | Root openapi | SSE response key | Typical consumer |
|---|---|---|---|
Self::V3_2 | "3.2.0" | itemSchema | Scalar, Swagger UI 5.32+ |
Self::V3_1 | "3.1.0" | schema | Redoc, openapi-generator, older tooling |
Default is Self::V3_2 because Scalar — the UI this crate mounts —
supports it natively and itemSchema is the documented way to
describe SSE streams. Downstream consumers that still need 3.1
(Redoc, openapi-generator, anything on swagger-parser < 3.2) should
opt out via ApiDocBuilder::sse_openapi_version.
Variants§
V3_1
Emit OpenAPI 3.1-compatible SSE responses (schema under
text/event-stream, root openapi left at utoipa’s default
"3.1.0").
V3_2
Emit OpenAPI 3.2 SSE responses (itemSchema under
text/event-stream, root openapi set to "3.2.0").
Trait Implementations§
Source§impl Clone for SseSpecVersion
impl Clone for SseSpecVersion
Source§fn clone(&self) -> SseSpecVersion
fn clone(&self) -> SseSpecVersion
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SseSpecVersion
impl Debug for SseSpecVersion
Source§impl Default for SseSpecVersion
impl Default for SseSpecVersion
Source§fn default() -> SseSpecVersion
fn default() -> SseSpecVersion
Source§impl PartialEq for SseSpecVersion
impl PartialEq for SseSpecVersion
impl Copy for SseSpecVersion
impl Eq for SseSpecVersion
impl StructuralPartialEq for SseSpecVersion
Auto Trait Implementations§
impl Freeze for SseSpecVersion
impl RefUnwindSafe for SseSpecVersion
impl Send for SseSpecVersion
impl Sync for SseSpecVersion
impl Unpin for SseSpecVersion
impl UnsafeUnpin for SseSpecVersion
impl UnwindSafe for SseSpecVersion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.