Hi everyone.
I’m playing with new extension ValidateJson()
I found this error (or incomplete report):
This code:
<cfset schema = '{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "Patient",
"description": "Patient of catalogue",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"genre": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
},
"required": [
"name",
"doctor"
]
}'>
<cfset json = '{
"name": 11,
"genre": {
"code": 3
}
}'>
<cfset result = ValidateJson(json, schema, false)>
<cfdump var="#result#">
The validation shows only one error:
Whereas the Validator Json Schema shows three errors:
(https://www.jsonschemavalidator.net/)
Any hint?
Many thanks
OS: Windows 10
Lucee Version: 5.3.7.47