Skip to content

fix(problem)!: adding a problem code no longer changes an API's OpenAPI types - #6

Merged
giraffesyo merged 1 commit into
canaryfrom
fix/open-problem-codes
Oct 1, 2026
Merged

giraffesyo merged 1 commit into
canaryfrom
fix/open-problem-codes

Conversation

@giraffesyo

Copy link
Copy Markdown
Member

Summary

humaproblem.Document listed every code as an enum on Problem.code and FieldError.code. That made each new code a change to the OpenAPI document and to SDKs generated from it: strictly typed clients see a new enum value, and every branch that adds a code edits the same lines of a checked-in spec.

RFC 9457 treats problem types as an open set, and clients here already fall back to the status for a code they don't know. So code is now an open string, documented as such, and the catalog at /problems/ remains the list of codes.

Breaking: humaproblem.Document is removed. Delete the call; nothing replaces it.

Testing

  • make check
  • TestSchemaLeavesCodesOpen checks neither schema has an enum and the default response is still problem+json.

Checklist

  • make check passes
  • A new or changed shared message is in every language in packages/problem/src/messages/ (none changed)
  • No code, rule or param was renamed (they are API contract)

@giraffesyo
giraffesyo merged commit bd45457 into canary Oct 1, 2026
3 checks passed
@giraffesyo
giraffesyo deleted the fix/open-problem-codes branch October 2, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant