diff options
Diffstat (limited to 'vendor/github.com/xeipuuv/gojsonschema/draft.go')
-rw-r--r-- | vendor/github.com/xeipuuv/gojsonschema/draft.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vendor/github.com/xeipuuv/gojsonschema/draft.go b/vendor/github.com/xeipuuv/gojsonschema/draft.go index 7a0123cc7..61298e7aa 100644 --- a/vendor/github.com/xeipuuv/gojsonschema/draft.go +++ b/vendor/github.com/xeipuuv/gojsonschema/draft.go @@ -92,6 +92,11 @@ func parseSchemaURL(documentNode interface{}) (string, *Draft, error) { if isKind(documentNode, reflect.Bool) { return "", nil, nil } + + if !isKind(documentNode, reflect.Map) { + return "", nil, errors.New("schema is invalid") + } + m := documentNode.(map[string]interface{}) if existsMapKey(m, KEY_SCHEMA) { |