mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-10 13:33:24 -05:00
JSON Schemas for the database, install and pack manifests, target manifests, site API envelopes and stats, plus the semantic invariants a schema cannot express: declared totals matching their lists, no destination both installed and omitted, database keys matching their sha1. validate_site.py checks the rendered HTML for metadata, headings, image alternatives, duplicate ids and unresolved local links. Pack manifests are read from inside the generated archives, where generate_pack writes them, rather than from a dist/ glob that matches nothing. Emulator and platform schemas gain additionalProperties: false, and cores[] plus contents[].name must be strings: an unquoted 81 or 01 in YAML parses as a number and stops matching the upstream name.
27 lines
753 B
JSON
27 lines
753 B
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://github.com/Abdess/retrobios/schemas/site-api-envelope.schema.json",
|
|
"title": "RetroBIOS static API v1 envelope",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["schema_version", "generated_at", "kind", "count", "items"],
|
|
"properties": {
|
|
"schema_version": { "const": 1 },
|
|
"generated_at": { "type": "string", "format": "date-time" },
|
|
"kind": {
|
|
"type": "string",
|
|
"enum": [
|
|
"catalog",
|
|
"platforms",
|
|
"emulators",
|
|
"verification-and-coverage-gaps"
|
|
]
|
|
},
|
|
"count": { "type": "integer", "minimum": 0 },
|
|
"items": {
|
|
"type": "array",
|
|
"items": { "type": "object" }
|
|
}
|
|
}
|
|
}
|