Skip to content

API versioning, deprecation, and Sunset for breaking stream contract changes #134

@greatest0fallt1me

Description

@greatest0fallt1me

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`
    
  1. Add version router; duplicate handlers only where needed (prefer feature flags).

  2. PR with migration doc for 3 breaking changes (examples).

  3. Security N/A; DX primary.

  4. 96h for framework; per-field moves can be child issues.

     ## Test and commit
    
  • 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-operationsStreamPay ghit: area-operationsdomain-apiStreamPay ghit: domain-apipriority-p2StreamPay ghit: priority-p2type-developer-experienceStreamPay ghit: type-developer-experience

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions