gize-openapi
OpenAPI spec generation for the Gize framework.
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 and self-service
GET /users/me endpoints, marks write and admin-gated 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
[]
= "0.9"
let manifest = from_toml?;
let spec = spec_json?; // serde_json::Value
# Ok::
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.