Files
zeekayandHanzo Dev 2a0c388a29 one generator: typed ops to OpenAPI, MCP, CLI and three SDKs
A zip app already projects one typed-op registry into a document, a tool
list, a command tree and a Go SDK, but nothing writes them together, so a
fleet ends up describing the same API in a docs pipeline, an SDK pipeline
and a hand-kept manifest. This writes all of them from one app, and adds
the two languages zip does not reach.

The document is the intermediate form for every client leg, so generating
from a live app and generating from the document that app wrote are one
pipeline rather than two to keep level. Proven byte-identical on egress.

Undeclared routes are filtered out of every projection. zip's own
extraction calls leak them — measured against v1.36.38: an undeclared op
is in OpenAPISpec, MCPTools and Commands while the live MCP door drops
it — which would publish a retired address as an SDK method.

The generated Rust and C++ are compiled and run by the tests, not merely
written.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-01 11:16:02 -07:00

26 lines
479 B
Makefile

GO ?= go
.PHONY: all build test check fmt vet clean
all: check
build:
$(GO) build ./...
# The compile checks build the generated Rust, C++ and Go for real. They need
# cargo, a C++20 compiler and nlohmann/json, and skip themselves when one is
# missing — so `make test` is honest about what it proved.
test:
$(GO) test ./...
check: fmt vet test
fmt:
@test -z "$$(gofmt -l . )" || { gofmt -l .; echo "gofmt"; exit 1; }
vet:
$(GO) vet ./...
clean:
$(GO) clean ./...