Skip to content

Support root-level $self for OpenAPI 3.2 (parse + SelfBefore32 rule) - #213

Merged
geemus merged 2 commits into
ota42y:masterfrom
treadinc:3-2/root-self
Oct 20, 2026
Merged

geemus merged 2 commits into
ota42y:masterfrom
treadinc:3-2/root-self

Conversation

@modosc

@modosc modosc commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

first 3.2 pr, part of #210.

  • parses $self as self_uri
  • SelfBefore32 flags $self in pre-3.2 docs
  • $self isn't used as the base uri for $ref resolution yet
  • adds the spec/data/openapi_3_2 fixture dir and integration_3_2_spec.rb, which the rest of the 3.2 prs build on

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

@takayamaki takayamaki left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry for the late review.
I read through this and it looks good to me.

  • The parse layer and the rule follow the same pattern as the 3.1 root-level fields (jsonSchemaDialect, webhooks).
  • SelfBefore32 is a good name, because both 3.0 and 3.1 lack this field.
  • $self is not used for $ref resolution yet.
    I think this is acceptable for now, like $dynamicRef, which is also parsed but not resolved.
    The CHANGELOG says this clearly.
  • Ruby 4.0 is not in the CI matrix, so I ran the tests locally on Ruby 4.0.5.
    They pass.

@geemus

geemus commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

@modosc thanks for working on this, and apologies also for my delays (the last couple weeks were surprisingly hectic).

@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, thanks!

@geemus
geemus merged commit 261b563 into ota42y:master Oct 20, 2026
16 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.

3 participants