oaisp/cli
gleam run -m oaisp/cli — the build-time CLI.
generate orchestrates the pipeline: it runs gleam export package-interface for the resolved type information, runs gleam run -- --emit-endpoints to collect the endpoint declarations the app wires into
add_openapi, merges the two, and writes the document atomically.
Status messages always go to stderr; with generate -o - the document is
the only thing on stdout, so it can be piped to other tools.
Values
pub fn build_document(
package_interface_json: String,
endpoints_json: String,
) -> Result(String, String)
Build the OpenAPI document from the two JSON inputs the pipeline gathers.
Pure, so the heart of generate is testable without shelling out.