feat: Add JSON schema definitions for coverage and trace artifacts in reachability benchmark

This commit is contained in:
StellaOps Bot
2025-12-03 09:49:59 +02:00
parent de53785176
commit e0b585c799
3 changed files with 98 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://stellaops.org/benchmark/reachability/coverage.schema.json",
"title": "Reachability Benchmark Coverage Artifact",
"type": "object",
"oneOf": [
{
"required": ["files"],
"properties": {
"files": {
"type": "object",
"additionalProperties": {
"type": "object",
"required": ["lines_covered", "lines_total"],
"properties": {
"lines_covered": {
"type": "array",
"items": { "type": "integer", "minimum": 1 }
},
"lines_total": { "type": "integer", "minimum": 1 }
},
"additionalProperties": false
}
}
},
"additionalProperties": false
},
{
"required": ["files"],
"properties": {
"files": {
"type": "array",
"items": {
"type": "object",
"required": ["path", "coverage"],
"properties": {
"path": { "type": "string" },
"functions": {
"type": "array",
"items": { "type": "string" }
},
"coverage": { "type": "number", "minimum": 0, "maximum": 1 }
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
]
}