Skip to main content

Module lower

Module lower 

Source
Expand description

Lowering OpenAPI documents into the intermediate representation (IR).

schema lowers component schemas into an crate::ir::Module. paths lowers operations into an crate::ir::Service. Both feed the emit pass. validate collects independent semantic problems so one run can report every problem it finds rather than aborting on the first.

Re-exports§

pub use crate::lower::paths::generate_service;
pub use crate::lower::prune::prune_unused_models;
pub use crate::lower::recurse::box_recursive_types;
pub use crate::lower::rename::TypeNames;
pub use crate::lower::rename::check_duplicate_models;
pub use crate::lower::rename::check_prelude_shadowing;
pub use crate::lower::rename::check_type_name_collisions;
pub use crate::lower::rename::rewrite_service;
pub use crate::lower::rename::type_renames;
pub use crate::lower::schema::generate_models;
pub use crate::lower::servers::lower_server_urls;
pub use crate::lower::validate::Diagnostics;

Modules§

paths
Lowering OpenAPI paths/operations into the server crate::ir::Service.
prune
Pruning component-schema models that no generated operation uses.
recurse
Giving a recursive type a size by boxing the field that closes the cycle.
rename
Resolution of top-level type names across the lowered IR.
schema
Lowering OpenAPI schemas into the crate::ir representation.
security
Lowering OpenAPI security schemes and requirements into the IR.
servers
Lowering the spec’s servers: block into the ServerUrls IR.
validate
Collection of semantic problems into one report.