Added minLength: 1 constraint to all required string properties in the openEHR API JSON schemas.
src/main/resources/json_schema/openehr_api_1.0.2_all.json- 185 constraints addedsrc/main/resources/json_schema/openehr_api_1.0.3_all.json- 183 constraints addedsrc/main/resources/json_schema/openehr_api_1.0.4_all.json- 184 constraints addedsrc/main/resources/json_schema/openehr_api_1.1.0_all.json- 193 constraints added
For every property that is:
- Listed in the
requiredarray - Has
"type": "string"
Added:
"minLength": 1- prevents empty strings"not": {"type": "null"}- explicitly rejects null values
This ensures that:
- Required string properties cannot be empty strings ("")
- Required string properties cannot be null
Before:
"value": {
"type": "string"
}After:
"value": {
"type": "string",
"minLength": 1,
"not": {
"type": "null"
}
}- ✅ Valid:
{"value": "some text"} - ❌ Invalid:
{"value": ""} - ❌ Invalid:
{"value": null} - ❌ Invalid:
{}(missing required property)