Tags: go-openapi/jsonpointer
Tags
fix: prevent panic on nil intermediate values during Set operations Add nil checks in setSingleImpl() and traversal loop to handle nil intermediate values gracefully. Per RFC 6901 Section 7, implementations must raise error conditions for unresolvable paths instead of panicking. - Add isNil() check before reflection operations in setSingleImpl() - Add nil validation in set() method traversal loop - Return descriptive errors: "cannot set field X on nil value" - Add comprehensive test cases for nil traversal scenarios Fixes panic: "reflect: call of reflect.Value.Type on zero Value" when traversing JSON paths containing nil intermediate values. Signed-off-by: Matthew F Leader <[email protected]>
updated dependencies Signed-off-by: Frederic BIDON <[email protected]>
chore(go): go-openapi requires go.1.20 across the board Signed-off-by: Frederic BIDON <[email protected]>
updated dependencies Signed-off-by: Frederic BIDON <[email protected]>
fix(GetForToken): added support for pointer to interface{}
reflect-based switch doesn't work when the value passed is *any:
the resulting indirection is typed as reflect.Interface and not
the actual underlying type.
* added more stringent checking on nil values (i.e. covers
interface{}(nil)
* contributes: go-swagger/go-swagger#1898 (pointers to content of a
x-... swagger extension)
Signed-off-by: Frederic BIDON <[email protected]>
PreviousNext