server-less-openapi 0.6.0

OpenAPI composition utilities for server-less
Documentation

server-less-openapi

crates.io docs.rs License

OpenAPI spec composition for server-less. It provides OpenApiBuilder and the supporting spec types for merging OpenAPI specifications generated from multiple protocol sources into one document, plus an OpenApiError type for composition failures.

This crate is dependency-light (just serde / serde_json) and can be used standalone, or transitively via the server-less facade's openapi / http features.

Example

use server_less::OpenApiBuilder;

let spec = OpenApiBuilder::new()
    .title("My API")
    .version("1.0.0")
    .merge(UserService::http_openapi_spec())
    .merge(OrderService::http_openapi_spec())
    .build()?;

Each merge folds another service's generated spec into the combined document, so a single OpenAPI file can describe an API stitched together from several independently-defined services.

Documentation

See the CHANGELOG.

License

MIT — see LICENSE.


Part of RHI.