Skip to content

fix: ignore unknown fields on nested response models - #69

Merged
caballeto merged 1 commit into
mainfrom
fix/postel-nested-response-shapes
Aug 14, 2026
Merged

fix: ignore unknown fields on nested response models#69
caballeto merged 1 commit into
mainfrom
fix/postel-nested-response-shapes

Conversation

@caballeto

Copy link
Copy Markdown
Member

Summary

  • Widen _is_response_shape so every generated model that is not *Request / *Params uses extra='ignore' (Postel's Law). *Dto already did this; nested shapes like StatusPageBranding and check-detail variants (Http, Dns, Tcp) still forbade extras.
  • That hole is the same class of bug that broke published MCP 1.4.0 on openIncident / component override fields — the next additive API field on branding would crash get / list again.
  • Request authoring stays extra='forbid'. Tests cover branding, component null extras, openIncident: null, and the classifier.

Linear: https://linear.app/devhelm/issue/END-489664

Test plan

  • uv run pytest tests/ (802 passed)
  • StatusPageBranding.model_validate({fontFamily: ...}) succeeds
  • CreateStatusPageRequest still rejects unknown top-level keys
  • Merge, then cut sdk-python 1.6.0 (./scripts/release.sh 1.6.0 on main) so MCP can pick up the nested-shape fix on the next lock refresh

Made with Cursor

*Dto already used extra='ignore'; nested shapes like StatusPageBranding
and check-detail variants still forbade extras, so the next additive API
field would crash get/list the same way openIncident broke MCP 1.4.0.
Request/Params stay extra='forbid'.

Co-authored-by: Cursor <cursoragent@cursor.com>
@caballeto
caballeto merged commit 4b9155e into main Aug 14, 2026
4 checks passed
@caballeto
caballeto deleted the fix/postel-nested-response-shapes branch August 14, 2026 08:48
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