Closed forest1102 closed 2 months ago
This is fixed in schemars 1.0.0-alpha.13 🙂
The schema generated from the sample given in this issue is now:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SampleJdto",
"type": "object",
"properties": {
"projectName": {
"type": "string",
"pattern": "[a-z]{2}$"
}
},
"required": [
"projectName"
]
}
Because of syntax difference in regex validation between Validator and schemars, compile error occurs when using regex.
In validators,
While schemars,
Sample: