Add OpenAPI 3.2 format detection and ruleset support#2917
Conversation
|
Hi @mkistler, Thanks for the contribution, we really appreciate this, as will all Spectral users, and coming from an OpenAPI TSC member ❤️ does this bring full support for OpenAPI 3.2 rules, or are there any gaps to be aware of? Just trying to ascertain before I dive in for a review and run though locally. Thanks again, Yousaf |
|
@YOU54F It's been a while since I created this, and I did it with the help of AI (now noted in the PR description), so I asked AI to check coverage of the new features as described in the changeling for OpenAPI 3.2. Here's what it reported: OpenAPI 3.2 feature checklistSource: OpenAPI 3.2.0 changelog How this checklist was evaluated
Baseline repo support for OpenAPI 3.2
Headline features
Data modeling and representation
Additional features
Standards and editorial changes
SummaryMost OpenAPI 3.2 additions are covered at the schema-validation level because Spectral ships the official OpenAPI 3.2 schema bundle and wires The biggest gaps are:
|
slegarraga
left a comment
There was a problem hiding this comment.
Thanks for pushing OAS 3.2 support — the format detection + ruleset wiring follow the same pattern as 3.1, which keeps things predictable.
Spot-checked:
oas3_2format regex mirrors 3.0/3.1 style- rules that were 3.1-only extended to
[oas3_1, oas3_2]where appropriate - new schema assets +
oas3_2-no-deprecated-xml-attributetest
Before merge I'd double-check: (1) 3.2 schema JSON tracks the current spec draft, (2) any 3.1-only rules that should not apply to 3.2 are left scoped correctly. Happy to re-review a smaller follow-up if you split docs vs schema.
Nice work overall — this is a meaningful chunk for the ecosystem.
Fixes #2910.
Checklist
Does this PR introduce a breaking change?
Screenshots
If applicable, add screenshots or gifs to help demonstrate the changes. If not applicable, remove this screenshots section before creating the PR.
Additional context
This PR was developed with the help of AI, specifically the Copilot CLI.