Repository navigation
Releases: pb33f/libopenapi
Release list
v0.41.8
-
Faster schema comparisons: reuse cached quick hashes before building referenced schemas, reducing processing time and allocations when UseSchemaQuickHash is enabled. (#670)
-
More accurate validation and change detection: compare enum entries by JSON value, fixing array/object false positives and numeric equality checks; correctly read whole-number floats such as maxLength: 2.0 in Swagger 2.0 parameters, items, and headers. (#656, #671)
v0..41.7
v0.41.7
This one stings a bit. With quick hash on (openapi-changes turns it on), a single circular reference made libopenapi treat every schema in the document as circular. Changes just vanished. I ran stripe.yaml against a copy with 300 breaking edits and got back zero. Zero.
Fixed. All 300 show up now. Big thanks to the contributors who chased down this one and three more. You lot are the best.
- Circular refs only flag schemas on a loop (#667, fixes #662). Quick-hash diffs on documents with cycles report what they were missing.
- No race when building from YAML merges (#658, fixes #657). Model building reads merged copies and leaves shared nodes alone. New public helper:
utils.ResolveMergeNodes. - Float-tagged int64 keywords read correctly (#666, fixes #665).
maxLength: 2.0stops turning into0. Huge values clamp, fractions stay unset. - Parameter
$reffound at any key position (#660, fixes #659). No more bogus "has nonamevalue" errors in OpenAPI 3.1. - Less hashing work (#664). Fewer redundant hashes, plus a new
NodeMap.GetNodeLines(). - Dependency bump.
golang.org/x/syncgoes to 0.24.0.
Upgrade, especially if you diff specs with cycles. Much more to come.
v0.41.6
Fixes seeded mock generation determinism.
v0.41.5
Added upgrades to the Go SDK generator to allow imperfect OpenAPI specs to generate correctly.
v0.41.4
Adds support for OpenAPI Overlays v1.2
v0.41.3
This release improves handling of malformed documents, schema comparisons, reference bundling, and reproducible mock generation.
- Parsing: Build valid sibling operations even when another operation fails, collect build errors, and avoid duplicate custom-operation builds.
- Schema comparison: Avoid false breaking-change reports when object schemas move into equivalent or broader anyOf/oneOf structures.
- Bundling: Correctly rewrite references inside vendor extensions, including pointers into nested schema properties.
- Mocks: Respect configured seeds for pattern-generated strings and produce stable XML element ordering.
- Tests: Add regression coverage for these fixes.
v0.41.2
Update hashing performance. No fixes or features, just faster and more performant.
v0.41.1
Stop duplicating files referenced from arrays
v0.41.0
Harder, Better, Faster, Stronger
- Rendering Stripe: 77% faster
- Rendering DocuSign (JSON): 87% faster
- Inline-rendering every Stripe schema: 80% faster
- Building JSON specs: 54% to 69% faster
- Across the whole pipeline: 58% less time, 57% less memory, 61% fewer allocations
We forked the YAML library
First thing the fork fixed: the emitter kept every single event it ever wrote, for the entire document. Rendering Stripe now allocates 76% less memory, and bundling it 71% less.
Bonus: folded block scalars (>) no longer grow a blank line when rendered. Rendered output finally matches its source.
This one breaks things. Swap go.yaml.in/yaml/v4 for github.com/pb33f/go-yaml in your imports. The package is still called yaml, so it's a find and replace. If you pass *yaml.Node values in or out of libopenapi you have to do it, because the two node types are different types. jsonpath v0.8.4, ordered-map v2.3.2 and testify v0.1.1 have all made the same move.
Two small breaks in the low-level API
NodeMap.Nodesis now a*low.NodeLinesinstead of a*sync.Map.Range,LoadandStoretakeintline numbers, andRangevisits lines in order. Most models get built and never read, so the line index only gets built when you ask for it.NodeReference.Contextis gone. libopenapi only ever set it on aPathItem's operations. UsepathItem.Get.Value.GetContext()instead.
Bugs, squashed
- Global caches kept dropped documents alive, and could hand a new object a stale hash when a memory address got reused. Both fixed. A document you drop now gets reclaimed without calling
ClearAllCaches. (#614, #615) - A
BaseURLwithout a scheme could crash the whole process during remote lookups. Not anymore. (#578) - The composed bundler panicked, or left a mangled mapping behind, when a
$refpointed at a sequence or scalar (like roottags). Fixed. (#607, #608) - what-changed was writing map keys into shared YAML nodes. That was a data race, and it put wrong (and random) keys in reports. Fixed. (#620)
- Swagger 2 headers now map
Format,ExclusiveMinimumandUniqueItemscorrectly. (#630) - Rendering a document no longer quietly rewrites the tags on your model's enum nodes.
Big thanks to @SAY-5 for the composed bundler fix, and to @jhump, @jorgembfigueira, @sohamsengupta17, @dnovikoff, @zLc362 and @andrei-samofalov for the reports. Keep them coming.
There's still more blood in this stone. Much more to come.
v0.40.1
fix: initialize operation reference so a failed sibling cannot cause a nil panic