Issue
I'm trying to traverse a *jsonschema.Schema using this library and notice that this library declares the following interface:
// JSONParent is an interface that enables tree traversal by listing
// all immediate children of an object
type JSONParent interface {
// JSONChildren should return all immidiate children of this element
// with json property names as keys, go types as values
// Note that implementations on slice-types are expected to convert
// integers to string keys
JSONProps() map[string]interface{}
}
Note that the JSONProps() function is actually documented as JSONChildren.
Also, https://github.com/qri-io/jsonschema exposes the JSONChildren() function and not JSONProps().
Do you have a suggested fix?
Two options:
- Don't introduce breaking changes and update the documentation here. Then update the
jsonschema package to implement both JSONProps() and JSONChildren() (which implements the same behaviour)
- Make a breaking change to this repo and change the signature to match the documentation. The only change to
jsonschema would be to update go.mod with the latest version.
Issue
I'm trying to traverse a
*jsonschema.Schemausing this library and notice that this library declares the following interface:Note that the
JSONProps()function is actually documented asJSONChildren.Also, https://github.com/qri-io/jsonschema exposes the
JSONChildren()function and notJSONProps().Do you have a suggested fix?
Two options:
jsonschemapackage to implement bothJSONProps()andJSONChildren()(which implements the same behaviour)jsonschemawould be to updatego.modwith the latest version.