Closed Cluas closed 2 years ago
@b5 can you help review the code?
A pointer is not a structure that should be evaluated or validated against as it's not really representable in JSON (it's either an array or object that needs to be serialized and validated on itself and it's children), and type null/nil is not it's data type here.
Whatever those map[string]interface{}
contain should either not be part of the validation process or you should wrap it up in a struct or at least type alias it and implement it as a keyword with it's validation and registration mechanics.
We currently have some scenarios where we construct map[string]interface{} directly and then call jsonschema.Validate , which avoids a json.Marshal operation, but I found that the DataType detection, when encountering a Pointer or Interface of nil, has Here it returns "unknown", when I would expect it to return "null".