Skip to content

Releases: pb33f/libopenapi

v0.17.0

26 Aug 19:50
Compare
Choose a tag to compare

Support for go 1.23 and the new range over function https://tip.golang.org/wiki/RangefuncExperiment feature.

A selection of new methods have been added to the orderedmap package.

  • FromOldest()
  • FromNewest()
  • KeysFromNewest()
  • ValuesFromNewest()
  • KeysFromOldest()
  • ValuesFromOldest()

This allows the range method to be used to iterate ordered maps.

Previously

for pair := orderedmap.First(schema.Properties.Value); pair != nil; pair = pair.Next() {
    buildProps(pair.Key(), pair.Value(), props, 0)
}

In v0.17+

for name, schemaProxy := range schema.Properties.Value.FromOldest() {
    buildProps(name, schemaProxy, props, 0)
}

@TristanSpeakEasy

v0.16.14

07 Aug 18:57
Compare
Choose a tag to compare

Better error handling for json package.

And included pathItems in datamodel for all v3+ (not sure how I missed this).

@TristanSpeakEasy

v0.16.12

05 Aug 13:31
Compare
Choose a tag to compare

Adds a new set of features to low level models. All nodes for a model are now captured when the model is built. Also some small gaps were covered at the low level.

No breaking changes.

v0.16.11

30 Jul 14:55
Compare
Choose a tag to compare

This fixes an issues where the schema level examples were wrongly being extracted and didn't properly match the shape of the top level named examples.

#312

No new features, no other fixes.

@TristanSpeakEasy

v0.16.10

09 Jul 17:46
Compare
Choose a tag to compare

No features or fixes, just adds a small nil check to upgraded lookup code in utils.

v0.16.9

08 Jul 14:18
Compare
Choose a tag to compare

Bugfixes, hardening and tuneups.

Fixes:

Adds GetKeyNode and GetRootNode methods to low level models. Useful for interfaces in downstream applications.
A general tuneup in various places after hammering the library as part of a larger stack of applications.

go-yaml currently panics when trying to render the test case. So we've got to short-circuit the "empty node" to not use Encode to copy across the empty scalar node, but just set the value explicitly

Removed golang.org/ x package in favour of the std lib

@ThomasRooney
@emilien-puget

v0.16.8

24 May 19:26
Compare
Choose a tag to compare

This release adds support to call the DisableRequiredCheck function on SchemaRenderer from the mock generator to allow rendering examples for all properties, regardless of their required status.

@martinsirbe

v0.16.7

17 May 21:24
Compare
Choose a tag to compare

Fixes a glitch where the spec format was not being set correctly when being parsed for 3.1. Also adds a small length check to prevent the node builder from throwing a panic with a mismatched index.

v0.16.6

11 May 18:53
Compare
Choose a tag to compare

Added MarshalJSON and MarshalJSONInline to base.Schema in high level model.

Addresses issue #289

Also handles error edge case with RenderAndReload on high level document

@khart-twilio @maboehm

v0.16.5

01 May 17:19
Compare
Choose a tag to compare
  • Adds support for rendering examples when they are nested in items (array) based schemas
  • Adds support for non-standard bigint and standard decimal formats when rendering schemas.
  • Adds better support for rendering single or multi examples.