Skip to main content

oapi_codegen/lower/
mod.rs

1//! Lowering OpenAPI documents into the intermediate representation (IR).
2//!
3//! [`schema`] lowers component schemas into an [`crate::ir::Module`]. [`paths`]
4//! lowers operations into an [`crate::ir::Service`]. Both feed the emit pass.
5//! [`validate`] collects independent semantic problems so one run can report
6//! every problem it finds rather than aborting on the first.
7
8/// Lowering of the validation keywords a schema declares. Used by [`schema`] and
9/// [`paths`] only.
10pub(crate) mod constraints;
11/// Lowering of a schema `default`. Used by [`schema`] and [`paths`] only.
12pub(crate) mod default;
13/// Readers for the `x-` extensions the generator understands.
14pub(crate) mod extension;
15pub mod paths;
16pub mod prune;
17pub mod recurse;
18pub mod rename;
19pub mod schema;
20pub mod security;
21pub mod servers;
22pub mod validate;
23
24pub use crate::lower::paths::generate_service;
25pub use crate::lower::prune::prune_unused_models;
26pub use crate::lower::recurse::box_recursive_types;
27pub use crate::lower::rename::TypeNames;
28pub use crate::lower::rename::check_duplicate_models;
29pub use crate::lower::rename::check_prelude_shadowing;
30pub use crate::lower::rename::check_type_name_collisions;
31pub use crate::lower::rename::rewrite_service;
32pub use crate::lower::rename::type_renames;
33pub use crate::lower::schema::generate_models;
34pub use crate::lower::servers::lower_server_urls;
35pub use crate::lower::validate::Diagnostics;