gize-openapi 0.7.0

OpenAPI spec generation for Gize (Beta phase; see ADR-010).
Documentation

gize-openapi

OpenAPI spec generation for the Gize framework.

Crates.io License

gize-openapi generates an OpenAPI 3.0.3 spec from the manifest (gize.toml) plus the DTOs, the same source of truth the CRUD and admin generators use, so the spec matches the generated routes by construction rather than by hand-kept annotations. See ADR-010.

The spec covers each resource's CRUD plus the users register/login endpoints, marks write routes as bearer-secured, hides password from responses, and includes relationship foreign keys. Enable it with gize new --openapi (or features.openapi in gize.toml); the app then serves it at GET /openapi.json with a reference UI at /docs, and gize sync keeps it in step with the manifest.

Usage

[dependencies]
gize-openapi = "0.7"
let manifest = gize_core::Manifest::from_toml(toml_text)?;
let spec = gize_openapi::spec_json(&manifest)?; // serde_json::Value
# Ok::<(), anyhow::Error>(())

Part of the Gize workspace

Crate Role
gize-core Domain model, manifest, dialect, conventions
gize-generator Codegen engine: safe writer, sync, plugins
gize-openapi OpenAPI spec generation (this crate)
gize The gize CLI

License

Licensed under either of Apache-2.0 or MIT at your option.