Frequently Asked Questions#
Common questions about APX usage, configuration, and best practices.
Architecture & Design#
Q: Will v2 code leak into v1 consumers?#
A: No. v2 lives in a separate Go module (.../v2 with its own go.mod). v1 imports never see v2 unless explicitly referenced. This follows Go’s semantic import versioning.
Q: Can APX discover APIs across the organization?#
A: Yes. apx search <query> queries the catalog (generated in the canonical repo). Use a single keyword: apx search payments.
Q: Can APX update dependencies automatically?#
A: Yes. apx update checks dependencies for compatible newer versions (minor/patch). apx upgrade <module-path> --to <line> handles major version transitions. Both update apx.yaml and apx.lock atomically.
Q: How does APX release APIs?#
A: APX opens a pull request against the canonical repository, copying module files to a feature branch for review and CI validation before merging.
Governance & Policy#
Q: How do we handle breaking changes?#
A: APX detects breaking changes automatically using format-specific tools (buf, oasdiff, etc.). Breaking changes require major version bumps. apx semver suggest --against=<ref> will recommend the appropriate version based on detected changes.
Versioning & Compatibility#
Q: What’s the difference between directory versions (v1/) and module versions?#
A:
Directory structure:
proto/payments/ledger/v1/contains schema filesProto package:
myorg.payments.ledger.v1includes version suffixGo module path:
github.com/org/apis/proto/payments/ledger(v1 has no suffix)Module path v2+:
github.com/org/apis/proto/payments/ledger/v2(includes suffix)
Q: How do we handle schema evolution within a major version?#
A: Within a major version (e.g., v1), you can make backwards-compatible changes:
Add new fields (with appropriate defaults)
Add new RPCs or methods
Add new enum values (at the end)
Make optional fields required is generally breaking
Q: Can different teams use different versions of the same API?#
A: Yes. Each major version is a separate Go module, so Team A can use v1 while Team B uses v2. This allows gradual migration without forcing everyone to upgrade simultaneously.
Development Workflow#
Q: Can I use APX on a fork of the canonical repo?#
A: Yes, for consumption and authoring (lint, breaking, gen, show, inspect). APX auto-detects forks by checking for an upstream git remote and uses the upstream org for canonical import paths. However, releasing from a fork is not supported — apx release submit and apx release tag require write access to the canonical repo. The recommended pattern is to author on your fork, open a PR to the canonical repo, and let the canonical repo’s post-merge CI handle releasing. See Working with Forks for details.
Q: Why are generated files not committed?#
A: Generated code is deterministic based on apx.lock. Not committing it:
Reduces merge conflicts
Ensures consistency across environments
Forces regeneration in CI for verification
Keeps repository clean and focused on source
Q: How do we handle local development with dependencies?#
A:
Use
apx addto pin dependencies inapx.lockRun
apx gen <language>to generate client codeImport generated code from
internal/gen/<language>/Never commit the
internal/gen/directory
CI/CD & Automation#
Q: How do we integrate APX with existing CI pipelines?#
A: Add APX validation to your existing workflows:
- run: apx fetch # download tools
- run: apx lint # validate schemas
- run: apx breaking --against=origin/main # check compatibility
apx policy check and apx lint --verbose are available for extended governance.
Q: What happens if app CI fails after tagging?#
A: The tag exists but no PR is created to the canonical repo. You can:
Fix the issues locally
Delete and recreate the tag
Push the corrected tag to trigger CI again
Q: Can we customize the PR created by apx release?#
A: Use apx release prepare + apx release submit for the full PR workflow with customizable release manifests. For full control, see the release pipeline.
Schema Formats#
Q: Does APX support formats other than Protocol Buffers?#
A: Yes. APX supports:
Protocol Buffers (primary, with buf integration)
OpenAPI (with oasdiff and Spectral)
Avro (with compatibility checking)
JSON Schema (with diff analysis)
Parquet (with custom compatibility rules)
Q: Can we mix schema formats in the same API?#
A: It’s possible but not recommended. Each format has different versioning and compatibility rules. Keep formats separate for cleaner governance and tooling.
Q: How does breaking change detection work for different formats?#
A: Each format uses specialized tools:
Proto:
buf breaking(file and wire compatibility)OpenAPI:
oasdiff breaking(API contract changes)Avro: compatibility modes (BACKWARD, FORWARD, FULL)
JSON Schema: schema diff analysis
Parquet: additive nullable columns only
Enterprise & Scale#
Q: How does APX handle large organizations with many teams?#
A:
CODEOWNERS provides per-API ownership
Domain organization groups related APIs
Catalog search helps discover existing APIs
Policy enforcement ensures consistency
Gradual rollout via feature flags
Q: Can we use APX with private/internal dependencies?#
A: Yes. APX works with private repositories by:
Using appropriate Git credentials
Configuring access tokens for CI
Supporting VPN/proxy environments
Allowing custom tool registries
Q: How do we handle API deprecation?#
A: APX supports a deprecation workflow:
Mark APIs as deprecated in schema comments
Update catalog metadata
Set sunset timelines in documentation
Coordinate migration with dependent teams
Performance & Optimization#
Q: How does APX handle large repositories?#
A:
PR-based workflow provides complete audit trail and review process
Selective releasing only processes changed APIs
Cache optimization for tools and dependencies
Incremental processing to handle repository scale efficiently
Q: Can we run APX in containers for consistency?#
A: Container-based execution (--use-container flag / APX_USE_CONTAINER env var) is planned for a future release. Currently, APX manages reproducible builds via pinned toolchain versions in apx.lock — use apx fetch to download the exact versions.
Q: How do we handle network restrictions?#
A: APX respects standard proxy settings:
export HTTP_PROXY=http://proxy.company.com:8080
export HTTPS_PROXY=http://proxy.company.com:8080
apx fetch # uses proxy for downloads
Troubleshooting#
Q: What if apx release submit fails with merge conflicts?#
A:
Ensure canonical repo is up to date
Resolve conflicts manually if needed
Contact API governance team for assistance
Consider rebasing your changes before releasing
Q: How do we debug schema validation failures?#
A:
apx lint --verbose # detailed error output
buf lint <specific-file> # direct buf validation
apx config validate # check configuration
Q: What if dependencies can’t be resolved?#
A:
Check canonical repo accessibility
Verify version exists in the canonical repo
Clear cache:
rm -rf ~/.cache/apx/Re-fetch tools:
apx fetch
Can’t find your answer?
Check the Troubleshooting Guide
Open a Discussion
Report an Issue