OpenApiInfo
struct OpenApiInfoTop-level info object.
Implements Copyable, Movable
- Fields
title: Stringversion: Stringdescription: String
flare_mlake · API · openapi
flare.openapi.specOpenAPI 3.1 spec data model + JSON serializer.
The model mirrors the OpenAPI 3.1 schema at the surface flare's comptime spec generator can populate from a router. We don't attempt a full schema reflector here -- only the structural elements a handler chain can produce mechanically:
info (title + version)paths: per-URI list of operationsThe emitter writes a deterministic JSON document with alphabetically-sorted object keys so two builds of the same router produce byte-identical output (useful for caching the Swagger UI bundle, diffing spec changes in PRs, etc.).
References:
OpenApiInfostruct OpenApiInfoTop-level info object.
Implements Copyable, Movable
title: Stringversion: Stringdescription: StringOpenApiParameterstruct OpenApiParameterA single parameter (path / query / header).
Implements Copyable, Movable
name: Stringlocation: Stringrequired: Boolschema_type: StringOpenApiResponsestruct OpenApiResponseA single response variant.
Implements Copyable, Movable
status: Stringdescription: Stringcontent_type: StringOpenApiOperationstruct OpenApiOperationA single <method> <path> operation.
Implements Copyable, Movable
method: Stringsummary: Stringoperation_id: Stringparameters: List[OpenApiParameter]responses: List[OpenApiResponse]OpenApiPathstruct OpenApiPathAll operations registered under one URI template.
Implements Copyable, Movable
template: Stringoperations: List[OpenApiOperation]OpenApiSpecstruct OpenApiSpecRoot OpenAPI 3.1 document.
Implements Copyable, Movable
info: OpenApiInfopaths: List[OpenApiPath]newdef new(title: String, version: String) -> Self emit_openapi_jsondef emit_openapi_json(spec: OpenApiSpec) -> String Serialise an OpenAPI spec to JSON.
The output is deterministic: object keys appear in a fixed order (alphabetical at every depth where the spec doesn't impose its own ordering), so two builds of the same router produce byte-identical documents.