Case Schema
Machine-readable schema for per-case metadata contracts.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://cityjson-corpus.org/schemas/case.schema.json",
"title": "Shared Corpus Case",
"type": "object",
"additionalProperties": false,
"required": [
"version",
"id",
"layer",
"family",
"source_kind",
"cityjson_version",
"representation",
"artifact_mode",
"artifact_paths",
"geometry_kind",
"assertions"
],
"properties": {
"version": {
"type": "integer",
"const": 2,
"description": "Case metadata format version."
},
"id": {
"type": "string",
"minLength": 1,
"description": "Stable case identifier."
},
"layer": {
"type": "string",
"enum": [
"conformance",
"operation",
"workload",
"invalid"
],
"description": "Corpus layer for the case. See schemas/README.md for the controlled vocabulary."
},
"family": {
"type": "string",
"minLength": 1,
"description": "Case family or taxonomy bucket. See schemas/README.md for the current corpus labels."
},
"source_kind": {
"type": "string",
"enum": [
"synthetic",
"real-geometry",
"real-geometry-enriched"
],
"description": "Provenance of the underlying case data. See schemas/README.md for the controlled vocabulary."
},
"cityjson_version": {
"type": "string",
"minLength": 1,
"description": "Target CityJSON version for the case."
},
"representation": {
"type": "string",
"enum": [
"cityjson",
"cityjsonfeature",
"jsonl",
"feature-files"
],
"description": "Primary storage layout for the case. See schemas/README.md for the controlled vocabulary."
},
"artifact_mode": {
"type": "string",
"enum": [
"checked-in",
"generated",
"acquired"
],
"description": "How the source artifact is materialized. See schemas/README.md for the controlled vocabulary."
},
"artifact_paths": {
"type": "object",
"additionalProperties": false,
"properties": {
"source": {
"type": "string",
"minLength": 1,
"description": "Repo-relative path to the checked-in source artifact."
},
"generated": {
"type": "string",
"minLength": 1,
"description": "Repo-relative path to the generated benchmark artifact."
},
"profile": {
"type": "string",
"minLength": 1,
"description": "Repo-relative path to the generator profile."
},
"acquisition": {
"type": "string",
"minLength": 1,
"description": "Repo-relative path to the acquisition metadata."
},
"manifest": {
"type": "string",
"minLength": 1,
"description": "Repo-relative path to the acquisition manifest."
}
},
"description": "Artifact pointers associated with the case."
},
"geometry_kind": {
"type": "string",
"enum": [
"dummy",
"real-preserved"
],
"description": "Whether geometry is synthetic or preserved from real data. See schemas/README.md for the controlled vocabulary."
},
"assertions": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1
},
"description": "Human-readable correctness expectations associated with the case. The list is not a controlled vocabulary."
},
"description": {
"type": "string",
"minLength": 1,
"description": "Optional prose summary for the case."
},
"profile": {
"type": "string",
"minLength": 1,
"description": "Optional generator profile path."
}
},
"allOf": [
{
"if": {
"properties": {
"artifact_mode": {
"const": "checked-in"
}
}
},
"then": {
"properties": {
"artifact_paths": {
"required": ["source"]
}
}
}
},
{
"if": {
"properties": {
"artifact_mode": {
"const": "generated"
}
}
},
"then": {
"properties": {
"artifact_paths": {
"required": [
"generated",
"profile"
]
}
}
}
},
{
"if": {
"properties": {
"artifact_mode": {
"const": "acquired"
}
}
},
"then": {
"properties": {
"artifact_paths": {
"required": ["acquisition"]
}
}
}
}
]
}