Skip to content

Accept additive HTTP JSON fields and add strict config decoding - #20

Merged
meoyawn merged 1 commit into
masterfrom
codex/lenient-http-strict-config
Oct 16, 2026
Merged

meoyawn merged 1 commit into
masterfrom
codex/lenient-http-strict-config

Conversation

@meoyawn

@meoyawn meoyawn commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Older Rust and Dart clients reject additive API response fields when a schema declares additionalProperties: false. A new podcast directory URL can therefore prevent an installed desktop client from loading any podcasts.

Default JSON models to accepting extra object fields, and add --strict for configuration decoding across Go, Rust, TypeScript, and Dart. Strict mode honors closed objects through nested models, arrays, and tagged payloads while preserving explicitly open metadata. TypeScript also supports --mode types and exports runtime config decoders; strict HTTP clients validate ordinary JSON responses. Install Dart in CI for the generated-runtime contract checks.

Validation:

  • Reproduced unknown field apple_podcasts_url with an older generated Rust HTTP client before the fix; the regression now passes.
  • moon run oasmith:test-rust: 8 passed, including required-field, type, and discriminator failures.
  • moon run oasmith:test: passed, including generated Go and Dart JSON policy checks.
  • moon run oasmith:lint: passed.
  • Parent workspace TypeScript runtime and type checks: 18 passed.

This controls unknown-field handling; it is not full JSON Schema validation.

@meoyawn
meoyawn marked this pull request as ready for review October 16, 2026 23:06
@meoyawn
meoyawn merged commit 2cd5a82 into master Oct 16, 2026
1 check passed
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