mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 04:20:17 +00:00
Modified toString function to encode a copy instead of the real (re-used) object, added schema tests for model.ChangeContext line and column on enum changes.
This commit is contained in:
@@ -405,7 +405,9 @@ func ExtractStringValueSliceChanges(lParam, rParam []low.ValueReference[string],
|
||||
|
||||
func toString(v any) string {
|
||||
if y, ok := v.(*yaml.Node); ok {
|
||||
_ = y.Encode(&v)
|
||||
copy := *y
|
||||
_ = copy.Encode(©)
|
||||
return fmt.Sprint(copy)
|
||||
}
|
||||
|
||||
return fmt.Sprint(v)
|
||||
|
||||
Reference in New Issue
Block a user