Skip to main content

Crate siderite_openapi

Crate siderite_openapi 

Source
Expand description

OpenAPI 3.1 document model and generation for siderite.

  • model – typed, serializable OpenAPI 3.1 structures.
  • DocumentBuilder – collects operations and produces a document whose schemas are deduplicated into components.schemas.
  • ui – HTML pages for Swagger UI (/docs) and ReDoc (/redoc).

This crate knows nothing about HTTP servers; siderite-core feeds it route metadata and serves the result.

Re-exports§

pub use model::Components;
pub use model::HttpMethod;
pub use model::Info;
pub use model::MediaType;
pub use model::OpenApi;
pub use model::Operation;
pub use model::Parameter;
pub use model::ParameterLocation;
pub use model::PathItem;
pub use model::RequestBody;
pub use model::Response;

Modules§

model
Typed OpenAPI 3.1 structures (the subset siderite generates).
ui
Documentation UI pages. Assets load from jsDelivr; the pages embed only the (escaped) spec URL and title.

Structs§

DocumentBuilder
Collects operations and produces a document.
SchemaObject
Re-export of the schema types operations are described with. A JSON Schema object: a map of schema keywords.
SchemaRegistry
Re-export of the schema types operations are described with. Collects named schema definitions while schemas are generated.

Enums§

OpenApiError
Errors produced while building a document.

Traits§

Schema
Re-export of the schema types operations are described with. Types that can describe themselves as JSON Schema.