summaryrefslogtreecommitdiff
path: root/vendor/github.com/xeipuuv/gojsonschema/draft.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-07 20:14:59 +0200
committerGitHub <noreply@github.com>2020-04-07 20:14:59 +0200
commit08fa3d511f2b96613bbbe76e517f2c9288e5bf56 (patch)
tree0210f08935553ea30dd17d4f19086de4b5fa880c /vendor/github.com/xeipuuv/gojsonschema/draft.go
parent9d0d9df6a1973ce9982071601fbdca68c93c6d07 (diff)
parent42fcdbf1a85c8e23ccc25a0e7e66b3a51b8f11dd (diff)
downloadpodman-08fa3d511f2b96613bbbe76e517f2c9288e5bf56.tar.gz
podman-08fa3d511f2b96613bbbe76e517f2c9288e5bf56.tar.bz2
podman-08fa3d511f2b96613bbbe76e517f2c9288e5bf56.zip
Merge pull request #5744 from vrothberg/update-image
vendor c/image v5.4.2
Diffstat (limited to 'vendor/github.com/xeipuuv/gojsonschema/draft.go')
-rw-r--r--vendor/github.com/xeipuuv/gojsonschema/draft.go5
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) {