APX β API Schema Management#
Contents
π Getting Started
Install APX and learn the core concepts for API schema management.
ποΈ Canonical Repo
Set up the organization-wide source of truth for all API schemas.
οΏ½ App Repos
Author and release schemas from your application repositories.
οΏ½ Dependencies
Discover, add, and update API dependencies with versioning.
οΏ½ Releasing
Tag-based release workflow from app repos to canonical repo.
π GitHub
View source code, report issues, and contribute to APX.
What is APX?#
APX is a tiny CLI and repo pattern for releasing, discovering, and consuming organization-wide API schemas. Primary: Protobuf. Also: OpenAPI, Avro, JSON Schema, Parquet. No long-running service. Canonical distribution via a single GitHub repo and Go modules, with CI-only releases.
Key Ideas#
Canonical source of truth:
github.com/<org>/apis(one repo, many submodules)Custom import roots: Optional
import_rootdecouples public Go import paths from Git hosting β use vanity domains likego.acme.dev/apiswhile hosting atgithub.com/acme/apisApp teams tag releases in their app repo;
apx release prepare+apx release submitopens a PR to the canonical repo (files are copied to a feature branch and submitted for review)Only CI in the canonical repo creates tags; Go modules are available automatically via the tag, while other language packages (Maven, wheels, OCI) require CI plugins teams configure separately
Protobuf is primary; OpenAPI/Avro/JSONSchema/Parquet supported at varying maturity levels (see Format Maturity Matrix)
Architecture Overview#
Teams author schemas locally
Tag releases in app repo
apx release prepare+submitopens PRsCI validates before release
Single source of truth
Versioned API modules
Protected branches & tags
CI creates releases
Quick Start#
# Install APX
brew install --cask <org>/tap/apx
# or download from GitHub Releases
# Verify installation
apx --version
# Bootstrap canonical repo
apx init canonical github.com/<org>/apis
# Bootstrap app repo for authoring
apx init app internal/apis/proto/payments/ledger
# Add dependencies
apx add proto/payments/ledger/v1@v1.2.3
# Generate code stubs
apx gen go
Supported Schema Formats#
Protocol Buffers (Primary)
Buf integration and workspace
gRPC service definitions
Semantic Import Versioning
Breaking change detection
OpenAPI
OpenAPI 3.0+ specifications
oasdiff breaking checks
Spectral linting
REST API definitions
Apache Avro
Schema compatibility checks
BACKWARD compatibility default
Field defaults and aliases
Data serialization schemas
JSON Schema & Parquet
JSON Schema validation
Parquet additive nullable columns
Custom compatibility rules
Schema evolution support
Release Guardrails#
Automated Checks (CI-enforced):
Format-specific linting and breaking change detection
Policy enforcement (ban service/ORM annotations)
SemVer guidance with
apx semver suggestProtected tag patterns (only CI can create tags)
Human Gates:
CODEOWNERSper API pathTime-boxed waivers for exceptions
Platform Requirements (v1.0 Scope)#
APX 1.0 will support GitHub and Gitea as the Git hosting platform for the canonical repository. All core features β tag-based releases, PR-based submissions, branch/tag protection, and the GitHub App bot identity β are designed and tested against these two platforms.
Supported hosting platforms:
Platform |
Support level |
|---|---|
GitHub (github.com) |
β Primary β fully supported |
GitHub Enterprise Server |
β Supported |
Gitea (self-hosted) |
β Supported (used for E2E test suite) |
GitLab |
β Non-goal for v1.0 |
Bitbucket |
β Non-goal for v1.0 |
Azure DevOps |
β Non-goal for v1.0 |
Other Git hosts |
β Non-goal for v1.0 |
CI runtime (where apx release commands run) is separate from hosting: GitHub Actions is primary, and apx release submit also detects GitLab CI and Jenkins environments for setting CI metadata. The canonical repository itself must live on GitHub or Gitea.
Supporting additional hosting platforms is out of scope for v1.0 and will be evaluated for future releases based on demand.
APX standardizes how teams author, release, and consume versioned APIs across your organization.