You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run into a minor bug where an OpenAPI 3 MediaType example is being incorrectly loaded from the low-level model into the high-level model. It is being represented as a low-level node ref. The same example field inside the schema does work correctly.
As a temporary workaround I have done this:
formt, item:=rangeop.RequestBody.Content {
// HACK: example is just a low-level node ref which may in fact just// be a node representing `null` or the real example.ifn, ok:=item.Example.(low.NodeReference[any]); ok {
item.Example=n.Value
}
Here's a simple test to show the bug in action:
$ go run ./bug
Obj {{"foo": "hello"} 0x1400011da40 0x1400011d9a0} <---- whoops
Schema {"bar": "world"}
The example was not being pulled through correctly, it was throwing the whole low.NodeReference in there. This has been resolved now and the value of the example is correctly pulled through to the MediaType high level object.
Signed-off-by: Dave Shanley <dave@quobix.com>
I've run into a minor bug where an OpenAPI 3 MediaType example is being incorrectly loaded from the low-level model into the high-level model. It is being represented as a low-level node ref. The same example field inside the schema does work correctly.
As a temporary workaround I have done this:
Here's a simple test to show the bug in action:
Code:
Part of danielgtaylor/restish#115.
The text was updated successfully, but these errors were encountered: