Skip to main content

serialize_schema

Function serialize_schema 

Source
pub fn serialize_schema(openapi: &OpenApi) -> Result<String, SchemaError>
Expand description

Serializes an OpenAPI document as deterministically ordered pretty JSON with a trailing newline.

Object keys are recursively sorted after Utoipa serialization. This also stabilizes extension maps whose backing collection can otherwise have nondeterministic iteration order.