Versioning policy, Deprecation and Sunset headers, and v2 migration
## Description
As **streams** and **escrow** fields evolve, define **/v1** and **/v2** (or **header
versioning**), 90-day minimum deprecation, Deprecation and optional Sunset
headers, and a public changelog for wallet partners. This reduces surprise
breakages in Soroban-related integrations.
## Requirements and context
- **Changelog** in `CHANGELOG.md` and linked from README.
-
OpenAPI tags per version; no silent field removal in minor if semver applies.
-
CI test that v1 still passes contract tests for N months.
-
Comms template for major deprecations.
-
Error with link to migration guide when v1 is called post-sunset.
## Suggested execution
1. `git checkout -b feature/api-sunset-v1`
-
Add version router; duplicate handlers only where needed (prefer feature flags).
-
PR with migration doc for 3 breaking changes (examples).
-
Security N/A; DX primary.
-
96h for framework; per-field moves can be child issues.
- Run the full test suite; add or update tests until the agreed coverage bar is met.
- Cover edge cases listed in this issue; document any intentional exclusions with brief rationale in the PR.
- Include relevant test output (e.g. test runner summary) or a link to a passing CI run in the pull request.
- Add security notes for auth, keys, PII, chain settlement, or money movement (assumptions verified, out-of-scope items).
Example commit message
docs(api): add versioning, Sunset headers, and migration guide for stream API changes
Guidelines
- Target: at least 95% coverage on new or meaningfully changed code (per the repo’s standard tooling).
- Documentation: update contributor-facing or API documentation where a reviewer would be blocked without it.
- Timeframe: 96 hours to ready-for-review (surface blockers early).
Versioning policy,
DeprecationandSunsetheaders, and v2 migrationversioning**), 90-day minimum deprecation,
Deprecationand optionalSunsetheaders, and a public changelog for wallet partners. This reduces surprise
breakages in Soroban-related integrations.
OpenAPI tags per version; no silent field removal in minor if semver applies.
CI test that v1 still passes contract tests for N months.
Comms template for major deprecations.
Error with link to migration guide when v1 is called post-sunset.
Add version router; duplicate handlers only where needed (prefer feature flags).
PR with migration doc for 3 breaking changes (examples).
Security N/A; DX primary.
96h for framework; per-field moves can be child issues.
Example commit message
docs(api): add versioning, Sunset headers, and migration guide for stream API changesGuidelines