AnyCrawl
AnyCrawl copied to clipboard
Validation error on schema type "enum"
unfortunately, the validator does not allow the enum type in the json schema.
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"is_main": {
"type": "boolean"
},
"contact_value": {
"type": "string"
},
"contact_type": {
"enum": [
"email",
"phone",
"social_url",
"web_site"
]
}
}
}
},
We are currently using a tiny version of the JSON schema and do not support enum for now. its for extract better and more accurate. You can add the enum values to the description. And, it may be considered to support it in the future.
Thank you. In strongly typed languages such as C#, it is a cool feature to translate a class into a json schema via reflection, where enums are widely used (and other simple types). Ok, Okay, I get it. It is not critical