xeipuuv/gojsonschema

Check IncorrectPropertyNameSchema, the error message is incorrect.

Opened this issue · 0 comments

const IncorrectPropertyNamesSchema = `{
        "schema" : {"$ref" : "http://json-schema.org/draft-06/schema"},
        "propertyNames" : 3
}`
schemaLoader := NewStringLoader(IncorrectPropertyNamesSchema)

_, err := NewSchema(schemaLoader)
fmt.Println(err.Error())

output:
expected : "Invalid type.Expected: valid schema, given : propertyNames"
actual : "Invalid type.Expected: valid schema, given : patternProperties"