Skip to main content

siderite_openapi/
lib.rs

1//! OpenAPI 3.1 document model and generation for siderite.
2//!
3//! * [`model`] – typed, serializable OpenAPI 3.1 structures.
4//! * [`DocumentBuilder`] – collects operations and produces a document whose
5//!   schemas are deduplicated into `components.schemas`.
6//! * [`ui`] – HTML pages for Swagger UI (`/docs`) and ReDoc (`/redoc`).
7//!
8//! This crate knows nothing about HTTP servers; `siderite-core` feeds it route
9//! metadata and serves the result.
10#![forbid(unsafe_code)]
11
12mod builder;
13pub mod model;
14pub mod ui;
15
16pub use builder::{DocumentBuilder, OpenApiError};
17pub use model::{
18    Components, HttpMethod, Info, MediaType, OpenApi, Operation, Parameter, ParameterLocation,
19    PathItem, RequestBody, Response,
20};
21
22/// Re-export of the schema types operations are described with.
23pub use siderite_validation::{Schema, SchemaObject, SchemaRegistry};