summaryrefslogtreecommitdiff
path: root/vendor/github.com/xeipuuv/gojsonschema/locales.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2019-01-08 14:52:57 +0100
committerValentin Rothberg <rothberg@redhat.com>2019-01-11 13:38:11 +0100
commitbd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87 (patch)
tree5f06e4e289f16d9164d692590a3fe6541b5384cf /vendor/github.com/xeipuuv/gojsonschema/locales.go
parent545f24421247c9f6251a634764db3f8f8070a812 (diff)
downloadpodman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.tar.gz
podman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.tar.bz2
podman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.zip
vendor: update everything
* If possible, update each dependency to the latest available version. * Use releases over commit IDs and avoid vendoring branches. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/xeipuuv/gojsonschema/locales.go')
-rw-r--r--vendor/github.com/xeipuuv/gojsonschema/locales.go33
1 files changed, 30 insertions, 3 deletions
diff --git a/vendor/github.com/xeipuuv/gojsonschema/locales.go b/vendor/github.com/xeipuuv/gojsonschema/locales.go
index ee41484a7..9b4570f01 100644
--- a/vendor/github.com/xeipuuv/gojsonschema/locales.go
+++ b/vendor/github.com/xeipuuv/gojsonschema/locales.go
@@ -36,16 +36,19 @@ type (
NumberNot() string
MissingDependency() string
Internal() string
+ Const() string
Enum() string
ArrayNotEnoughItems() string
ArrayNoAdditionalItems() string
ArrayMinItems() string
ArrayMaxItems() string
Unique() string
+ ArrayContains() string
ArrayMinProperties() string
ArrayMaxProperties() string
AdditionalPropertyNotAllowed() string
InvalidPropertyPattern() string
+ InvalidPropertyName() string
StringGTE() string
StringLTE() string
DoesNotMatchPattern() string
@@ -76,6 +79,9 @@ type (
HttpBadStatus() string
ParseError() string
+ ConditionThen() string
+ ConditionElse() string
+
// ErrorFormat
ErrorFormat() string
}
@@ -116,6 +122,10 @@ func (l DefaultLocale) Internal() string {
return `Internal Error {{.error}}`
}
+func (l DefaultLocale) Const() string {
+ return `{{.field}} does not match: {{.allowed}}`
+}
+
func (l DefaultLocale) Enum() string {
return `{{.field}} must be one of the following: {{.allowed}}`
}
@@ -137,7 +147,11 @@ func (l DefaultLocale) ArrayMaxItems() string {
}
func (l DefaultLocale) Unique() string {
- return `{{.type}} items must be unique`
+ return `{{.type}} items[{{.i}},{{.j}}] must be unique`
+}
+
+func (l DefaultLocale) ArrayContains() string {
+ return `At least one of the items must match`
}
func (l DefaultLocale) ArrayMinProperties() string {
@@ -156,6 +170,10 @@ func (l DefaultLocale) InvalidPropertyPattern() string {
return `Property "{{.property}}" does not match pattern {{.pattern}}`
}
+func (l DefaultLocale) InvalidPropertyName() string {
+ return `Property name of "{{.property}}" does not match`
+}
+
func (l DefaultLocale) StringGTE() string {
return `String length must be greater than or equal to {{.min}}`
}
@@ -268,14 +286,23 @@ func (l DefaultLocale) ErrorFormat() string {
//Parse error
func (l DefaultLocale) ParseError() string {
- return `Expected: %expected%, given: Invalid JSON`
+ return `Expected: {{.expected}}, given: Invalid JSON`
+}
+
+//If/Else
+func (l DefaultLocale) ConditionThen() string {
+ return `Must validate "then" as "if" was valid`
+}
+
+func (l DefaultLocale) ConditionElse() string {
+ return `Must validate "else" as "if" was not valid`
}
const (
STRING_NUMBER = "number"
STRING_ARRAY_OF_STRINGS = "array of strings"
STRING_ARRAY_OF_SCHEMAS = "array of schemas"
- STRING_SCHEMA = "schema"
+ STRING_SCHEMA = "valid schema"
STRING_SCHEMA_OR_ARRAY_OF_STRINGS = "schema or array of strings"
STRING_PROPERTIES = "properties"
STRING_DEPENDENCY = "dependency"