Expand description
The Layover Tower HTTP surface.
Everything in generated comes from api/openapi.yaml by way of
cargo xtask generate-api. The specification is the contract: cargo xtask verify
regenerates the module and fails if it differs, so the server cannot drift away from the
document that describes it.
This crate provides the shape of the API and nothing behind it. Implement Api to serve
it; the Tower will, once it exists.
struct Stub;
impl Api for Stub {
async fn get_health(&self) -> Result<Health, Problem> {
Ok(Health {
status: Status::Ok,
version: env!("CARGO_PKG_VERSION").to_owned(),
ground_stop: false,
})
}
}
let app = router(Arc::new(Stub));Re-exports§
pub use generated::*;
Modules§
- generated
- The Layover HTTP surface, generated from
api/openapi.yaml.
Structs§
- Event
Stream - A server-sent event stream, returned by streaming operations.