baukit-openapi 0.1.0

Small OpenAPI metadata, serialization, writing, and drift-check helpers.
Documentation

Small, product-neutral helpers for consistent OpenAPI documents.

Products continue to own paths, operations, and endpoint schemas. This crate only applies Baukit's document conventions, provides the shared error envelope schema, offers opt-in bearer authentication metadata, and manages a deterministic committed schema.

Example

use baukit_openapi::{ErrorEnvelope, OpenApiMetadata, serialize_schema};
use utoipa::openapi::Server;

#[derive(utoipa::OpenApi)]
#[openapi(components(schemas(ErrorEnvelope)))]
struct ApiDoc;

let mut document = <ApiDoc as utoipa::OpenApi>::openapi();
OpenApiMetadata::new("Orders API", "1.2.3", "The Orders service API")
    .servers([Server::new("https://api.example.com")])
    .apply_to(&mut document);

let json = serialize_schema(&document)?;
assert!(json.ends_with('\n'));
# Ok::<(), baukit_openapi::SchemaError>(())