Skip to content

Support components.mediaTypes for OpenAPI 3.2 (parse + MediaTypesBefore32 rule) - #230

Merged
geemus merged 2 commits into
ota42y:masterfrom
treadinc:3-2/components-media-types
Oct 30, 2026
Merged

geemus merged 2 commits into
ota42y:masterfrom
treadinc:3-2/components-media-types

Conversation

@modosc

@modosc modosc commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

part of #210.

  • parses components.mediaTypes
  • in 3.2 docs, request body / response content resolves $refs, so bodies validate against the referenced media type
  • a $ref that doesn't resolve raises under strict_reference_validation, otherwise it accepts any body
  • 3.0/3.1 docs are unchanged: a $ref in content is still ignored
  • adds allow_3_2_features: true to opt earlier docs into 3.2 runtime behavior (the discriminator defaultMapping and query / additionalOperations prs use it too)
  • a $ref'd file with no openapi: field follows the doc that loaded it
  • parameter/header content isn't modeled

…re32 rule)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@geemus geemus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@geemus
geemus merged commit bde5557 into ota42y:master Oct 30, 2026
12 checks 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.

2 participants