Skip to content

RFC: Safe partial-update behavior for PUT-only APIs #54

Open

Description

@petebacondarwin

Context

Some APIs expose replacement-oriented PUT operations but no PATCH operation. Users may still expect a CLI update command to preserve fields they did not specify.

A generic GET, merge, then PUT flow could emulate a partial update, but it can also overwrite concurrent changes or mishandle fields whose omission, null, empty value, or server default have different meanings.

Questions to resolve

  • Which endpoints have a concurrency token such as an ETag or version?
  • Can replacement schemas distinguish omitted fields from explicit clearing?
  • Which operations are idempotent and safe to retry?
  • How should secrets, write-only fields, computed fields, and server defaults be handled?
  • Should emulation be opt-in, endpoint-specific, or rejected when safety cannot be proven?

Safety requirements

  • Do not perform an unguarded read-modify-write when concurrent changes can be lost.
  • Preserve explicit clearing and replacement semantics.
  • Fail before mutation when the current representation cannot be reconstructed safely.
  • Show the effective request through dry-run without exposing secrets.

Outcome

Document the supported policy and implement it only for endpoints that satisfy the agreed safety constraints, with concurrency and failure-path tests.

Activity

  1. added
    enhancement
    priority: p2
    on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpriority: p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions