Skip to content

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

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

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 force-pushed the openapi-3-2/streaming-media-type-fields branch from 175cb02 to 4d6cc33 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/streaming-media-type-fields branch 2 times, most recently from 6da9b77 to b10cd9f Compare September 24, 2026 21:37
@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
@modosc
modosc force-pushed the openapi-3-2/discriminator-default-mapping branch from 85d8438 to 94cac5c Compare September 25, 2026 01:36
@modosc
modosc force-pushed the openapi-3-2/streaming-media-type-fields branch from 05eb752 to 994fc54 Compare September 25, 2026 01:36
@modosc
modosc removed this pull request from stack #20 October 14, 2026 21:06
@modosc
modosc force-pushed the openapi-3-2/streaming-media-type-fields branch from 994fc54 to 99e8549 Compare October 14, 2026 21:07
@modosc
modosc force-pushed the openapi-3-2/discriminator-default-mapping branch from 94cac5c to 4e71009 Compare October 14, 2026 21:07
@modosc
modosc added this pull request to stack #22 October 14, 2026 21:07
@modosc
modosc removed this pull request from stack #22 October 20, 2026 16:57
@modosc
modosc force-pushed the openapi-3-2/discriminator-default-mapping branch from 4e71009 to b2697c5 Compare October 20, 2026 16:57
@modosc
modosc force-pushed the openapi-3-2/streaming-media-type-fields branch from 99e8549 to 7b76c66 Compare October 20, 2026 16:57
@modosc
modosc added this pull request to stack #23 October 20, 2026 16:57
@modosc
modosc removed this pull request from stack #23 October 22, 2026 17:18
@modosc
modosc force-pushed the openapi-3-2/streaming-media-type-fields branch from 7b76c66 to b7fd20a Compare October 22, 2026 17:18
@modosc
modosc force-pushed the openapi-3-2/discriminator-default-mapping branch from b2697c5 to 745c6fd Compare October 22, 2026 17:18
@modosc
modosc added this pull request to stack #24 October 22, 2026 17:18
@modosc
modosc removed this pull request from stack #24 October 27, 2026 16:11
@modosc
modosc force-pushed the openapi-3-2/streaming-media-type-fields branch from b7fd20a to ca906e1 Compare October 27, 2026 16:11
@modosc
modosc force-pushed the openapi-3-2/discriminator-default-mapping branch from 745c6fd to 9149adc Compare October 27, 2026 16:11
@modosc
modosc added this pull request to stack #25 October 27, 2026 16:11
… fallback + DefaultMappingBefore32 rule)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@modosc
modosc removed this pull request from stack #25 October 30, 2026 16:17
@modosc
modosc force-pushed the openapi-3-2/discriminator-default-mapping branch from 9149adc to df13e8d Compare October 30, 2026 16:17
@modosc
modosc force-pushed the openapi-3-2/streaming-media-type-fields branch from ca906e1 to 217b7e4 Compare October 30, 2026 16:17
@modosc
modosc added this pull request to stack #26 October 30, 2026 16:17
@modosc
modosc removed this pull request from stack #26 November 2, 2026 17:19
@modosc

modosc commented Nov 2, 2026

Copy link
Copy Markdown
Author

merged upstream

@modosc modosc closed this Nov 2, 2026
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