Skip to content

add support for openapi 3.2 #210

Description

@modosc

(split out from #152 (comment))

i have my attempt at 3.2 support. it's 16 (sorry!) stacked prs here that follow the same pattern as 3.1:

  • parse new fields permissively
  • add a SpecValidator rule per feature
  • add runtime support only where it's simple

what's covered:

  • runtime:
    • query / additionalOperations routing
    • case-insensitive method lookup in request_operation
    • discriminator.defaultMapping
    • $ref in content (e.g. into components.mediaTypes)
  • parse only:
    • $self
    • itemSchema
    • response summary
  • detection only: the rest of the new fields
  • deprecation rules:
    • allowEmptyValue
    • xml.attribute / xml.wrapped

left out for now:

  • runtime validation of in: querystring
  • runtime validation of streaming bodies (itemSchema)
  • $self as a base uri for $ref resolution
  • cookie params (never validated at runtime, so style: cookie is detection only)

existing 3.0/3.1 docs shouldn't see any behavior change:

  • the runtime changes above only apply to docs that declare 3.2+
  • specs pin the 3.0/3.1 behavior
  • allow_3_2_features: true opts older docs in
  • one tiny exception: PathItem#operation(:summary) now returns nil instead of the summary string

there's also a .ruby-version bump, since i couldn't install 3.1.0 locally (arm64 issue).

@takayamaki @geemus what's the best way forward here? do either of you want to look at the changes from the fork first, or should i open these up here?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions