Repository navigation
🔁 Conversion That Keeps What You Wrote
v1.71.0 is a converter release. Local $refs now arrive naming the same thing, request bodies and path items stop disappearing, array serialization carries across versions, and what the target cannot express is reported instead of dropped.
⚠️ Read before upgrading: converted documents change, some for most inputs, and some conversions that reported success now report critical issues. See Behavior Changes.
🧵 Array Serialization (#701)
collectionFormatandstyle/explodemap both ways, on parameters, response headers and form fields. A default 2.0csvquery array used to become one value per element; it now converts tostyle: form,explode: false.- Going down, a default 3.x query array is written as
collectionFormat: multi. - What the target cannot express is reported:
tsv, delimiters on paths and headers, nested arrays, and joined form arrays that the target version cannot join.
🧩 Parameter and Header Types, 3.x to 2.0 (#701)
OAS 2.0 declares these values inline. A $ref, allOf, anyOf or oneOf there used to become type: string.
- References to component schemas are followed and
allOfmembers merged, keepingitems,enumand constraints. - Where alternatives differ, only a type is kept, and that is reported.
constbecomes a one valueenum, and a schema naming only values takes their type.not, several types,falseschemas and other constraints with no inline spelling are reported.
🔗 References (#690, #691, #692)
- Deep local
$refs such as#/definitions/Pair/items/0are rewritten to their target's new position. - Request bodies:
$refs to request bodies and tobodyorformDataparameters are followed and converted as what they name.components.requestBodiesand 2.0 parameter definitions map to each other. - Path item
$refs are no longer written as{}, which lost every operation behind them.
🕳️ Nullable, 3.0 to 3.1 and Later (#696)
nullable: true is now rewritten as a "null" entry in type, so the converted schema still accepts null.
📚 Diff Documentation (#674)
The diff help, package docs, guides and skill now match what the code does: severities, exit status, samples and what is compared. No detection or severity changed.
Behavior Changes
Output
- Most documents with array query parameters change in both directions.
- 3.x to 2.0 output keeps types that used to be
string, andallowEmptyValueon query parameters. - 3.x to 2.0 output no longer carries path item
summaryordescription(reported as info). - Operations that lost a request body now have one.
- Deep
$refs are rewritten, and may be percent-encoded ({id}as%7Bid%7D).
New failures
- A
$refwhose target is not in the output, a request body$refthat names nothing, and a path item$refthat reaches nothing are critical issues, so those conversions are no longer successful. - Converting a Go-built document that holds a cycle returns an error. Parsed YAML or JSON never holds one.
Reports
- New warnings for dropped request body
encoding, dropped path itemservers, droppedallowReservedand parameterdeprecated, dropped alternatives and unsayable constraints. Strict mode can fail where it passed. - New info notes for dropped request body examples.
- The 3.0
nullablereports are now info, not warnings. - An explicit
stylethat OAS 2.0 already does is no longer reported. diffbetween a 3.0 source and its 3.1 output reports thenullableandtypechanges.
httpvalidator
uniqueItemson Go values that JSON cannot spell, such as structs and pointers, now compares the values rather than their printed form.
🔒 User Impact
- No exported API changes and no dependency changes
⚡ Performance
For ordinary documents, oastools convert takes about the same time as v1.70.2 (within 1% on the Stripe and GitHub corpus specs). A document with a $ref that points past a component takes longer: about 40% on the Stripe spec with one such reference added.
Converter allocations are close to v1.70.2: on the benchmark fixtures, converting an already parsed small document went from 121 to 128 (2.0 to 3.x) and 272 to 283 (3.x to 2.0).
🧪 CI (#685, #686)
The integration scenarios now run on every pull request, and the harness fails a scenario that does not check what it says.
Known Limits
- 3.x to 2.0 still misstates server variables, bearer and OAuth2 flows, and sends multipart bodies as
body(#577); operationserversare dropped silently (#694) - 3.1 to 3.0 keeps fields 3.0 does not define (#565), and 2.0 output can keep schema keywords 2.0 does not define (#693)
- Examples are dropped in places (#578)
- Converting 3.1 down, a constraint written beside a
$refstays beside it, where 2.0 and 3.0 ignore it, and a 3.1nullable, which had no effect, takes effect in 3.0
📊 Quality Metrics
- ✅
make checkpassing (13,321 tests) - ✅ Corpus and integration suites passing
- ✅ Zero vulnerabilities (
govulncheckclean) - ✅ Benchmarks recorded: of 304, only two parsed-document conversion benchmarks moved by more than 5% in allocations (121 to 128, 123 to 130)
What's Changed
- docs: correct what the diff documentation claims by @erraggy in #674
- test(integration): re-baseline the corpus fixer tests by @erraggy in #685
- ci: run the integration scenarios and make the harness check what it says by @erraggy in #686
- fix(converter): keep deep local refs naming their target by @erraggy in #690
- fix(converter): follow parameter and request body refs by @erraggy in #691
- fix(converter): carry a path item $ref across versions by @erraggy in #692
- fix(converter): rewrite nullable as a null type when upgrading 3.0 by @erraggy in #696
- fix(converter): keep array serialization and inline parameter types across versions by @erraggy in #701
- chore: prepare v1.71.0 release by @erraggy in #702 (includes converter documentation corrections, runnable examples for the new behavior and two example README fixes)
Issues Fixed
- #562 - Fixed by PR #686
- #563 - Fixed by PR #685
- #574 - Fixed by PR #691
- #575 - Fixed by PR #701
- #576 - Fixed by PR #696
- #579 - Fixed by PR #691
- #583 - Fixed by PR #674
- #688 - Fixed by PR #690
- #689 - Fixed by PR #692
Full Changelog: v1.70.2...v1.71.0