mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-06 12:37:49 +00:00
Fixed JSON rendering for example object
This commit is contained in:
@@ -60,7 +60,9 @@ func (e *Example) MarshalYAML() (interface{}, error) {
|
||||
// MarshalJSON will marshal this into a JSON byte slice
|
||||
func (e *Example) MarshalJSON() ([]byte, error) {
|
||||
var g map[string]any
|
||||
e.Value.Decode(&g)
|
||||
nb := high.NewNodeBuilder(e, e.low)
|
||||
r := nb.Render()
|
||||
r.Decode(&g)
|
||||
return json.Marshal(g)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user