Skip to content

Commit 4527dc1

Browse files
committed
feat: complete canonical API v2 convergence
1 parent fb7ae6e commit 4527dc1

224 files changed

Lines changed: 28667 additions & 30258 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ LDFLAGS=-ldflags="-s -w"
1919
# Directories
2020
FRONTEND_DIR=frontend
2121

22-
.PHONY: all build build-linux build-windows build-windows-arm64 clean deps frontend help hooks lint dev-build release openapi openapi-check coding-agent-image dev-tools install-golangci-lint install-govulncheck install-deadcode ci-tools-check ci-go ci-frontend ci
22+
.PHONY: all build build-linux build-windows build-windows-arm64 clean deps frontend help hooks lint dev-build release openapi openapi-check openapi-v2-check coding-agent-image dev-tools install-golangci-lint install-govulncheck install-deadcode ci-tools-check ci-go ci-frontend ci
2323

2424
# Tooling. swag is a tool dependency tracked in go.mod (see `tool` directive),
2525
# so the version is pinned and CI / dev installs always agree. `go tool swag`
@@ -160,6 +160,10 @@ openapi-check:
160160
-out-yaml $$tmpdir/openapi.yaml \
161161
-out-json $$tmpdir/openapi.json && \
162162
echo "OpenAPI spec generates cleanly and validates as OpenAPI 3.0."
163+
@$(MAKE) --no-print-directory openapi-v2-check
164+
165+
openapi-v2-check:
166+
@go run ./scripts/openapi-v2-check -spec api/openapi-v2.json
163167

164168
# Run static analysis
165169
lint:
@@ -216,6 +220,6 @@ help:
216220
@echo " make dev-tools - Install pinned Go tools used by CI"
217221
@echo " make hooks - Install git pre-commit hook"
218222
@echo " make openapi - Regenerate api/openapi.{yaml,json} from handler annotations"
219-
@echo " make openapi-check - Verify api/openapi.{yaml,json} is up to date (used by hooks/CI)"
223+
@echo " make openapi-check - Validate v1 generation and v2 route/spec parity (used by hooks/CI)"
220224
@echo " make coding-agent-image - Build the thin ws-carrier image (WS_IMAGE for windshift-agent)"
221225
@echo " make help - Show this help message"

api/embed.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ var SpecJSON []byte
1515
//go:embed openapi.yaml
1616
var SpecYAML []byte
1717

18+
// V2SpecJSON is the canonical dual-mount API v2 contract.
19+
//
20+
//go:embed openapi-v2.json
21+
var V2SpecJSON []byte
22+
1823
// AgentStudioSpecYAML documents the cookie/session-header /api surface used by
1924
// Agent Studio. It is deliberately separate from the bearer-token v1 spec.
2025
//

api/openapi-v2.json

Lines changed: 1570 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)