feat: serve each schema at its own $id

This commit is contained in:
Abdessamad Derraz committed 2026-10-23 10:46:05 +02:00
1 parent 820b9013b3
commit e3a54d2423
9 files changed
+199 -33

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/Abdess/retrobios/schemas/database.schema.json",
"$id": "https://abdess.github.io/retrobios/api/v1/schemas/database.schema.json",
"title": "RetroBIOS content database",
"type": "object",
"additionalProperties": false,
+1
View File
@@ -1,5 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://abdess.github.io/retrobios/api/v1/schemas/emulator.schema.json",
"title": "Emulator BIOS Profile",
"description": "One YAML per emulator core or engine, documenting every external file the code loads. Field reference: https://abdess.github.io/retrobios/wiki/profiling/",
"type": "object",
+39 -20
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/Abdess/retrobios/schemas/install-manifest.schema.json",
"$id": "https://abdess.github.io/retrobios/api/v1/schemas/install-manifest.schema.json",
"title": "RetroBIOS installer manifest",
"type": "object",
"additionalProperties": false,
@@ -54,21 +54,26 @@
},
"platform": {
"type": "string",
"minLength": 1
"minLength": 1,
"description": "Registry key of the platform (batocera)."
},
"display_name": {
"type": "string",
"minLength": 1
"minLength": 1,
"description": "Name the site shows for the platform."
},
"version": {
"type": "string"
"type": "string",
"description": "Version of the platform's own list this manifest was built from."
},
"generated": {
"type": "string",
"format": "date-time"
"format": "date-time",
"description": "When the manifest was written."
},
"base_destination": {
"type": "string"
"type": "string",
"description": "The BIOS folder entries are written below, as the platform names it. Empty when entries start one level higher (RetroDECK)."
},
"detect": {
"type": "array",
@@ -84,11 +89,13 @@
},
"total_files": {
"type": "integer",
"minimum": 0
"minimum": 0,
"description": "Number of entries in files."
},
"total_size": {
"type": "integer",
"minimum": 0
"minimum": 0,
"description": "Bytes of the files in files."
},
"pack_files": {
"description": "Files the platform's pack holds once extracted: this list, the data directories and the pack's own documents.",
@@ -102,7 +109,8 @@
},
"total_omitted": {
"type": "integer",
"minimum": 0
"minimum": 0,
"description": "Number of entries in omitted_files."
},
"core_names": {
"description": "Each core a file names, with the other names it goes by upstream (the buildbot's mednafen_psx for beetle_psx).",
@@ -331,13 +339,15 @@
"pattern": "^[^/\\\\]+$"
}
}
}
},
"description": "Files the pack needs and the repository cannot serve, with the reason."
},
"files": {
"type": "array",
"items": {
"$ref": "#/$defs/file"
}
},
"description": "Every file the installer fetches, one entry per destination."
},
"case_variants": {
"description": "Files the folded list serves under another case, installed only where the target directory keeps case.",
@@ -459,22 +469,27 @@
"properties": {
"dest": {
"type": "string",
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$"
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$",
"description": "Path below base_destination, or below the save directory when root is save."
},
"sha1": {
"type": "string",
"pattern": "^[a-f0-9]{40}$"
"pattern": "^[a-f0-9]{40}$",
"description": "SHA1 of the copy the repository serves. The installer checks it after download."
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
"pattern": "^[a-f0-9]{64}$",
"description": "SHA256 of the same copy."
},
"size": {
"type": "integer",
"minimum": 0
"minimum": 0,
"description": "Bytes of the same copy."
},
"repo_path": {
"type": "string"
"type": "string",
"description": "Path in the repository. Fetched from https://raw.githubusercontent.com/Abdess/retrobios/<ref>/<repo_path>, ref being main unless RETROBIOS_REF names a tag."
},
"cores": {
"oneOf": [
@@ -488,14 +503,17 @@
},
"uniqueItems": true
}
]
],
"description": "Profiles whose core brings the file into the pack. Null for a file the platform's own list declares."
},
"storage": {
"const": "release"
"const": "release",
"description": "release when the file is a large-files release asset."
},
"release_asset": {
"type": "string",
"pattern": "^[^/\\\\]+$"
"pattern": "^[^/\\\\]+$",
"description": "Asset of the large-files release, fetched from https://github.com/Abdess/retrobios/releases/download/large-files/<asset> instead of repo_path."
},
"systems": {
"description": "Every platform system that declares the file, for the installer's --system.",
@@ -929,5 +947,6 @@
}
]
}
}
},
"description": "What a platform's pack installs, one file per entry, as install.py reads it. The platform's list says what the setup checks, this list says what the pack writes: the list's files plus every file the setup's cores load."
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/Abdess/retrobios/schemas/pack-manifest.schema.json",
"$id": "https://abdess.github.io/retrobios/api/v1/schemas/pack-manifest.schema.json",
"title": "RetroBIOS pack integrity manifest",
"type": "object",
"additionalProperties": false,
+9 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/Abdess/retrobios/schemas/platform.schema.json",
"$id": "https://abdess.github.io/retrobios/api/v1/schemas/platform.schema.json",
"title": "Platform Configuration",
"description": "Schema for retrogaming platform BIOS configuration files",
"type": "object",
@@ -506,6 +506,14 @@
"type": "boolean",
"description": "Added by our scraper from the cores' source, not declared in the platform's own file"
},
"shared_group": {
"type": "string",
"description": "Set on load, never written in a platform file: the entry joined the system from this group of _shared.yml, named by the system's includes. The platform's own file does not carry it"
},
"zip_digest": {
"const": "composite",
"description": "Set on load, never written in a platform file: the md5 of this ZIP is the md5 of its members concatenated in name order, as Recalbox computes it, never the md5 of the archive bytes"
},
"native_name": {
"type": "string",
"description": "Display name the platform gives its own system"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/Abdess/retrobios/schemas/release.schema.json",
"$id": "https://abdess.github.io/retrobios/api/v1/schemas/release.schema.json",
"title": "RetroBIOS release record",
"description": "What the packs of the latest release hold, read from the archives when the release is cut.",
"type": "object",
+145 -7
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/Abdess/retrobios/schemas/site-api-envelope.schema.json",
"$id": "https://abdess.github.io/retrobios/api/v1/schemas/site-api-envelope.schema.json",
"title": "RetroBIOS static API v1 envelope",
"type": "object",
"additionalProperties": false,
@@ -22,7 +22,11 @@
"commit": {
"type": "string",
"pattern": "^[0-9a-f]{40}$",
"description": "The repository commit the data was read at."
"description": "The repository commit the data was read at. Every envelope carries it when the site is built from a git checkout."
},
"license": {
"type": "string",
"description": "The terms the metadata is offered under, from LICENSE. They never cover BIOS or firmware files (NOTICE)."
},
"kind": {
"type": "string",
@@ -33,7 +37,10 @@
"systems",
"verification-and-coverage-gaps",
"file-locations",
"file-lookup"
"file-lookup",
"index",
"system-index",
"core-index"
]
},
"count": {
@@ -115,7 +122,8 @@
"type": "string"
},
"profile": {
"type": "object"
"type": "object",
"description": "The profile as its YAML states it, valid against emulator.schema.json (https://abdess.github.io/retrobios/api/v1/schemas/emulator.schema.json)."
}
}
}
@@ -150,10 +158,15 @@
"type": "string"
},
"contract": {
"type": "object"
"type": "object",
"description": "The platform's list as the tools load it, valid against platform.schema.json (https://abdess.github.io/retrobios/api/v1/schemas/platform.schema.json). Entries a shared group adds carry shared_group, and a Recalbox ZIP entry carries zip_digest."
},
"coverage": {
"type": "object"
},
"registry": {
"type": "object",
"description": "The platform's registry entry beside its list: install detection, logo, scraper and schedule. Not part of the list."
}
}
}
@@ -261,7 +274,8 @@
"pattern": "^[0-9a-f]{40}$"
},
"url": {
"type": "string"
"type": "string",
"description": "Site-absolute path of the file's card, starting at /retrobios/."
}
}
}
@@ -384,7 +398,8 @@
"type": "string"
},
"url": {
"type": "string"
"type": "string",
"description": "Site-absolute path of the page that shows the value, starting at /retrobios/. Prefix https://abdess.github.io for a full URL."
},
"sha1": {
"type": "string",
@@ -398,6 +413,129 @@
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "index"
}
}
},
"then": {
"properties": {
"items": {
"items": {
"type": "object",
"required": [
"title",
"url"
],
"properties": {
"title": {
"type": "string"
},
"url": {
"type": "string",
"description": "Relative to this document's URL."
},
"description": {
"type": "string"
}
}
}
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "system-index"
}
}
},
"then": {
"properties": {
"items": {
"items": {
"type": "object",
"required": [
"id",
"name",
"manufacturer",
"url",
"sha1"
],
"properties": {
"id": {
"type": "string",
"description": "The system id a platform list or an emulator profile writes."
},
"name": {
"type": "string",
"description": "The name the site shows for the id."
},
"manufacturer": {
"type": "string"
},
"url": {
"type": [
"string",
"null"
],
"description": "Site-absolute path of the console section holding the id's files, null when no section holds them."
},
"sha1": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9a-f]{40}$"
},
"description": "SHA1 of each collection file a platform list or an emulator profile names for the id."
}
}
}
}
}
}
},
{
"if": {
"properties": {
"kind": {
"const": "core-index"
}
}
},
"then": {
"properties": {
"items": {
"items": {
"type": "object",
"required": [
"name",
"profile"
],
"properties": {
"name": {
"type": "string",
"description": "A core name as the buildbot or a platform writes it (mednafen_psx), a profile id, or an alias profile."
},
"profile": {
"type": "string",
"description": "The profile id whose api/v1/emulators/<id>.json and page describe it."
},
"preferred": {
"type": "boolean",
"description": "The profile a platform list naming this core gets: its own key first, else the first claimant."
}
}
}
}
}
}
}
]
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/Abdess/retrobios/schemas/stats.schema.json",
"$id": "https://abdess.github.io/retrobios/api/v1/schemas/stats.schema.json",
"title": "RetroBIOS public statistics",
"type": "object",
"additionalProperties": false,
+1 -1
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/Abdess/retrobios/schemas/target-manifest.schema.json",
"$id": "https://abdess.github.io/retrobios/api/v1/schemas/target-manifest.schema.json",
"title": "RetroBIOS hardware target manifest",
"description": "Per-target core availability. A null core list means the target publishes no inventory: a known target with no filter, not an absent one.",
"type": "object",