Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR allows `Rebind` to work on `schema.TypedNode`. This was a hidden error because oftentimes the representation form is compatible with the typed form. However when you start to use custom representations e.g. tuple, then `Rebind` will not work, since the `datamodel.Node` will have a map, when represented type expects a list. The solution is to simply convert a `TypedNode` to it's representation form prior to binding to the type. This is likely not used very often - if you have a _typed_ node then you have/had it in it's native Go type at some point, so you shouldn't need to rebind. This is however seen it tests, when a server is invoked by a client without serializing/deserializing capability caveats - and the validator has to parse already parsed caveats.
- Loading branch information