87 lines
3.3 KiB
JSON
87 lines
3.3 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "evidence-map.schema.json",
|
|
"title": "03_evidence_map.json",
|
|
"type": "object",
|
|
"required": ["schema_version", "claims"],
|
|
"properties": {
|
|
"schema_version": {"const": "1.0"},
|
|
"claims": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["id", "statement", "status", "source_ids", "source_locations", "does_not_support", "load_bearing"],
|
|
"properties": {
|
|
"id": {"type": "string", "minLength": 1, "pattern": "\\S"},
|
|
"statement": {"type": "string", "minLength": 1, "pattern": "\\S"},
|
|
"status": {"enum": ["source_backed", "observed", "measured", "derived", "recommended", "assumption"]},
|
|
"source_ids": {"type": "array", "items": {"type": "string", "minLength": 1, "pattern": "\\S"}, "uniqueItems": true},
|
|
"source_locations": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["source_id", "locator"],
|
|
"properties": {
|
|
"source_id": {"type": "string", "minLength": 1, "pattern": "\\S"},
|
|
"locator": {"type": "string", "minLength": 1, "pattern": "\\S"}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"does_not_support": {"type": "array", "items": {"type": "string", "minLength": 1, "pattern": "\\S"}},
|
|
"load_bearing": {"type": "boolean"},
|
|
"premise_ids": {"type": "array", "items": {"type": "string", "minLength": 1, "pattern": "\\S"}, "uniqueItems": true},
|
|
"label": {"type": "string", "minLength": 1, "pattern": "\\S"},
|
|
"method": {"type": "string", "minLength": 1, "pattern": "\\S"},
|
|
"environment": {"type": "string", "minLength": 1, "pattern": "\\S"},
|
|
"result": {"type": "string", "minLength": 1, "pattern": "\\S"}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {"properties": {"status": {"enum": ["source_backed", "observed", "measured"]}}},
|
|
"then": {
|
|
"properties": {
|
|
"source_ids": {"minItems": 1},
|
|
"source_locations": {"minItems": 1}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"if": {"properties": {"status": {"const": "measured"}}},
|
|
"then": {
|
|
"required": ["method", "environment", "result"],
|
|
"properties": {"does_not_support": {"minItems": 1}}
|
|
}
|
|
},
|
|
{
|
|
"if": {"properties": {"status": {"const": "derived"}}},
|
|
"then": {
|
|
"required": ["premise_ids"],
|
|
"properties": {"premise_ids": {"minItems": 1}}
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"load_bearing": {"const": true},
|
|
"status": {"enum": ["source_backed", "observed", "measured", "derived"]}
|
|
}
|
|
},
|
|
"then": {"properties": {"does_not_support": {"minItems": 1}}}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"status": {"enum": ["recommended", "assumption"]}
|
|
}
|
|
},
|
|
"then": {"required": ["label"]}
|
|
}
|
|
],
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": true
|
|
}
|