Skip to content

Support Discriminator defaultMapping for OpenAPI 3.2 (parse + runtime fallback + DefaultMappingBefore32 rule) - #10

Draft
modosc wants to merge 1 commit into
openapi-3-2/streaming-media-type-fieldsfrom
openapi-3-2/discriminator-default-mapping
Draft

modosc wants to merge 1 commit into
openapi-3-2/streaming-media-type-fieldsfrom
openapi-3-2/discriminator-default-mapping

Conversation

@modosc

@modosc modosc commented Sep 18, 2026 •

Copy link
Copy Markdown
  • parses defaultMapping (a schema name or same-document ref)
  • in 3.2 docs (or with allow_3_2_features), it's used as a fallback when the discriminator property is missing
  • also used when the value has no explicit mapping and no implicit schema match
  • a broken explicit mapping still errors
  • 3.0/3.1 docs ignore defaultMapping, and without it error behavior is unchanged (including null/false property values)

depends on #9.

@modosc
modosc force-pushed the openapi-3-2/discriminator-default-mapping branch from 8c5dbb6 to 94a2ec1 Compare September 23, 2026 15:40
@modosc
modosc added this pull request to stack #13 September 23, 2026 15:43
@modosc
modosc force-pushed the openapi-3-2/discriminator-default-mapping branch 3 times, most recently from 4474279 to b76740d Compare September 24, 2026 21:27
@modosc
modosc force-pushed the openapi-3-2/discriminator-default-mapping branch from b76740d to 89a7e1e Compare September 24, 2026 21:37
@modosc
modosc removed this pull request from stack #13 September 24, 2026 21:38
@modosc
modosc added this pull request to stack #15 September 24, 2026 21:38
@modosc
modosc force-pushed the openapi-3-2/discriminator-default-mapping branch from 89a7e1e to 85d8438 Compare September 24, 2026 22:28
@modosc
modosc removed this pull request from stack #15 September 24, 2026 22:29
@modosc
modosc added this pull request to stack #20 September 24, 2026 22:29
@modosc modosc changed the title Support Discriminator defaultMapping for OpenAPI 3.2 (parse + runtime fallback + rule) Support Discriminator defaultMapping for OpenAPI 3.2 (parse + runtime fallback + DefaultMappingBefore32 rule) Sep 24, 2026
… fallback + DefaultMappingBefore32 rule)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant