{
  "type": "object",
  "properties": {
    "dataset": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "generatedAtUtc": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "scope": {
          "type": "string"
        },
        "schemaVersion": {
          "const": "2.0.0"
        },
        "exporterVersion": {
          "type": "string"
        },
        "canonicalUrl": {
          "const": "https://bobku.net/edm-artist/data.html"
        },
        "license": {
          "const": "https://bobku.net/edm-artist/license.html"
        },
        "lyricsPolicy": {
          "const": "https://bobku.net/edm-artist/license.html#lyrics"
        },
        "sqliteIncludesLyrics": {
          "type": "boolean"
        },
        "provenanceIncluded": {
          "type": "boolean"
        },
        "csvMode": {
          "enum": [
            "spreadsheet",
            "raw"
          ]
        }
      },
      "required": [
        "name",
        "version",
        "generatedAtUtc",
        "description",
        "scope",
        "schemaVersion",
        "exporterVersion",
        "canonicalUrl",
        "license",
        "lyricsPolicy",
        "sqliteIncludesLyrics",
        "provenanceIncluded",
        "csvMode"
      ],
      "additionalProperties": false
    },
    "artist": {
      "type": "object",
      "properties": {
        "name": {
          "const": "Bobku"
        },
        "url": {
          "const": "https://bobku.net/"
        },
        "musicBrainzArtistId": {
          "const": "f028fe61-1f0f-4ca1-8eb3-e6bfdc4d68be"
        },
        "wikidataQid": {
          "const": "Q139504144"
        },
        "googleKnowledgeGraphMid": {
          "const": "/g/11ylvskdgn"
        }
      },
      "required": [
        "name",
        "url",
        "musicBrainzArtistId",
        "wikidataQid",
        "googleKnowledgeGraphMid"
      ],
      "additionalProperties": false
    },
    "recordCounts": {
      "type": "object",
      "properties": {
        "albums": {
          "type": "integer",
          "minimum": 0
        },
        "songs": {
          "type": "integer",
          "minimum": 0
        },
        "genres": {
          "type": "integer",
          "minimum": 0
        },
        "album_tracks": {
          "type": "integer",
          "minimum": 0
        },
        "song_genres": {
          "type": "integer",
          "minimum": 0
        },
        "song_narratives": {
          "type": "integer",
          "minimum": 0
        },
        "song_dedications": {
          "type": "integer",
          "minimum": 0
        },
        "song_links": {
          "type": "integer",
          "minimum": 0
        },
        "song_lyrics": {
          "type": "integer",
          "minimum": 0
        },
        "genre_aliases": {
          "type": "integer",
          "minimum": 0
        },
        "musicbrainz_genres": {
          "type": "integer",
          "minimum": 0
        },
        "genre_musicbrainz_mappings": {
          "type": "integer",
          "minimum": 0
        },
        "lyrics_metadata": {
          "type": "integer",
          "minimum": 0
        }
      },
      "required": [
        "albums",
        "songs",
        "genres",
        "album_tracks",
        "song_genres",
        "song_narratives",
        "song_dedications",
        "song_links",
        "song_lyrics",
        "genre_aliases",
        "musicbrainz_genres",
        "genre_musicbrainz_mappings",
        "lyrics_metadata"
      ],
      "additionalProperties": false
    },
    "albums": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/album"
      }
    },
    "genres": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/genre"
      }
    },
    "songs": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/song"
      }
    }
  },
  "required": [
    "dataset",
    "artist",
    "recordCounts",
    "albums",
    "genres",
    "songs"
  ],
  "additionalProperties": false,
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://bobku.net/edm-artist/data/catalog-schema.json",
  "$defs": {
    "album": {
      "type": "object",
      "properties": {
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "tagline": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": [
            "string",
            "null"
          ]
        },
        "releaseDate": {
          "type": [
            "string",
            "null"
          ]
        },
        "upc": {
          "type": [
            "string",
            "null"
          ]
        },
        "coverImageUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "canonicalUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "musicbrainzUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "googleKnowledgeGraphMid": {
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "type": "integer"
        },
        "links": {
          "type": "object",
          "properties": {
            "spotify": {
              "type": [
                "string",
                "null"
              ]
            },
            "apple": {
              "type": [
                "string",
                "null"
              ]
            },
            "youtube": {
              "type": [
                "string",
                "null"
              ]
            },
            "bandcamp": {
              "type": [
                "string",
                "null"
              ]
            },
            "amazon": {
              "type": [
                "string",
                "null"
              ]
            },
            "musicbrainz": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "spotify",
            "apple",
            "youtube",
            "bandcamp",
            "amazon",
            "musicbrainz"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "title",
        "tagline",
        "type",
        "releaseDate",
        "upc",
        "coverImageUrl",
        "canonicalUrl",
        "musicbrainzUrl",
        "googleKnowledgeGraphMid",
        "id",
        "links"
      ],
      "additionalProperties": false
    },
    "single": {
      "type": "object",
      "properties": {
        "exists": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "releaseDate": {
          "type": [
            "string",
            "null"
          ]
        },
        "upc": {
          "type": [
            "string",
            "null"
          ],
          "description": "UPC of this single only; never substituted from a primary album."
        },
        "coverImageUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "links": {
          "type": "object",
          "properties": {
            "apple": {
              "type": [
                "string",
                "null"
              ]
            },
            "amazon": {
              "type": [
                "string",
                "null"
              ]
            },
            "spotify": {
              "type": [
                "string",
                "null"
              ]
            },
            "youtube": {
              "type": [
                "string",
                "null"
              ]
            },
            "musicbrainz": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "apple",
            "amazon",
            "spotify",
            "youtube",
            "musicbrainz"
          ],
          "additionalProperties": false
        },
        "googleKnowledgeGraphMid": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "exists",
        "releaseDate",
        "upc",
        "coverImageUrl",
        "links",
        "googleKnowledgeGraphMid"
      ],
      "additionalProperties": false
    },
    "lyrics": {
      "type": "object",
      "properties": {
        "available": {
          "type": "boolean"
        },
        "contentStatus": {
          "enum": [
            "text",
            "instrumental",
            "empty",
            "not_recorded"
          ]
        },
        "format": {
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": [
            "string",
            "null"
          ]
        },
        "updatedUtc": {
          "type": [
            "string",
            "null"
          ]
        },
        "includedInBulkExport": {
          "const": false,
          "description": "Legacy flag: lyric text excluded from main JSON/CSV, not from the separate SQLite research distribution."
        },
        "includedInJson": {
          "const": false
        },
        "includedInCsv": {
          "const": false
        },
        "includedInSqlite": {
          "type": "boolean"
        },
        "pageUrl": {
          "type": "string"
        },
        "reusePolicy": {
          "const": "https://bobku.net/edm-artist/license.html#lyrics"
        }
      },
      "required": [
        "available",
        "contentStatus",
        "format",
        "source",
        "updatedUtc",
        "includedInBulkExport",
        "includedInJson",
        "includedInCsv",
        "includedInSqlite",
        "pageUrl",
        "reusePolicy"
      ],
      "additionalProperties": false
    },
    "genre": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "aliases": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "type": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "name",
              "type"
            ],
            "additionalProperties": false
          }
        },
        "musicbrainzMappings": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "matchType": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "confidence": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "isPrimary": {
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "name",
              "matchType",
              "confidence",
              "isPrimary"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "id",
        "name",
        "aliases",
        "musicbrainzMappings"
      ],
      "additionalProperties": false
    },
    "song": {
      "type": "object",
      "properties": {
        "urlSlug": {
          "type": [
            "string",
            "null"
          ]
        },
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "subtitle": {
          "type": [
            "string",
            "null"
          ]
        },
        "bpm": {
          "type": [
            "string",
            "null"
          ]
        },
        "camelotKey": {
          "type": [
            "string",
            "null"
          ]
        },
        "leadProducer": {
          "type": [
            "string",
            "null"
          ]
        },
        "dedication": {
          "type": [
            "string",
            "null"
          ]
        },
        "dedicationSourceDoc": {
          "type": [
            "string",
            "null"
          ]
        },
        "durationDisplay": {
          "type": [
            "string",
            "null"
          ]
        },
        "durationIso8601": {
          "type": [
            "string",
            "null"
          ]
        },
        "primaryAlbumId": {
          "type": [
            "integer",
            "null"
          ]
        },
        "trackNumber": {
          "type": [
            "integer",
            "null"
          ]
        },
        "primaryTrackNumber": {
          "type": [
            "integer",
            "null"
          ]
        },
        "bpmSpotify": {
          "type": [
            "integer",
            "null"
          ]
        },
        "id": {
          "type": "integer"
        },
        "canonicalUrl": {
          "type": "string"
        },
        "album": {
          "anyOf": [
            {
              "$ref": "#/$defs/album"
            },
            {
              "type": "null"
            }
          ]
        },
        "primaryAlbum": {
          "anyOf": [
            {
              "$ref": "#/$defs/album"
            },
            {
              "type": "null"
            }
          ]
        },
        "albumAppearances": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "album": {
                "$ref": "#/$defs/album"
              },
              "trackNumber": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "isPrimary": {
                "type": "boolean"
              }
            },
            "required": [
              "album",
              "trackNumber",
              "isPrimary"
            ],
            "additionalProperties": false
          }
        },
        "releaseDate": {
          "type": [
            "string",
            "null"
          ],
          "description": "Compatibility alias for earliest recording release, NOT the single date."
        },
        "firstReleaseDate": {
          "type": [
            "string",
            "null"
          ]
        },
        "hasSingleRelease": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "single": {
          "$ref": "#/$defs/single"
        },
        "durationSeconds": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "genres": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "genreAssignments": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "genreId": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "position": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "genreId",
              "name",
              "position"
            ],
            "additionalProperties": false
          }
        },
        "identifiers": {
          "type": "object",
          "properties": {
            "isrc": {
              "type": [
                "string",
                "null"
              ]
            },
            "iswc": {
              "type": [
                "string",
                "null"
              ]
            },
            "upc": {
              "type": [
                "string",
                "null"
              ]
            },
            "bmiWorkNumber": {
              "type": [
                "string",
                "null"
              ]
            },
            "mlcSongCode": {
              "type": [
                "string",
                "null"
              ]
            },
            "musicbrainzRecordingUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "googleKnowledgeGraphMid": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "isrc",
            "iswc",
            "upc",
            "bmiWorkNumber",
            "mlcSongCode",
            "musicbrainzRecordingUrl",
            "googleKnowledgeGraphMid"
          ],
          "additionalProperties": false
        },
        "festival": {
          "type": "object",
          "properties": {
            "cueIn": {
              "type": [
                "string",
                "null"
              ]
            },
            "primaryType": {
              "type": [
                "string",
                "null"
              ]
            },
            "primaryDetail": {
              "type": [
                "string",
                "null"
              ]
            },
            "secondaryType": {
              "type": [
                "string",
                "null"
              ]
            },
            "secondaryDetail": {
              "type": [
                "string",
                "null"
              ]
            },
            "narrativeShort": {
              "type": [
                "string",
                "null"
              ]
            },
            "narrativeFull": {
              "type": [
                "string",
                "null"
              ]
            },
            "narrativeNote": {
              "type": [
                "string",
                "null"
              ]
            },
            "producerNote": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "cueIn",
            "primaryType",
            "primaryDetail",
            "secondaryType",
            "secondaryDetail",
            "narrativeShort",
            "narrativeFull",
            "narrativeNote",
            "producerNote"
          ],
          "additionalProperties": false
        },
        "links": {
          "type": "object",
          "properties": {
            "canonicalUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "spotify": {
              "type": [
                "string",
                "null"
              ]
            },
            "youtubeSong": {
              "type": [
                "string",
                "null"
              ]
            },
            "youtubeVideo": {
              "type": [
                "string",
                "null"
              ]
            },
            "youtubeMusic": {
              "type": [
                "string",
                "null"
              ]
            },
            "amazon": {
              "type": [
                "string",
                "null"
              ]
            },
            "apple": {
              "type": [
                "string",
                "null"
              ]
            },
            "soundcloud": {
              "type": [
                "string",
                "null"
              ]
            },
            "bandcamp": {
              "type": [
                "string",
                "null"
              ]
            },
            "genius": {
              "type": [
                "string",
                "null"
              ]
            },
            "musixmatch": {
              "type": [
                "string",
                "null"
              ]
            },
            "musicbrainz": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "canonicalUrl",
            "spotify",
            "youtubeSong",
            "youtubeVideo",
            "youtubeMusic",
            "amazon",
            "apple",
            "soundcloud",
            "bandcamp",
            "genius",
            "musixmatch",
            "musicbrainz"
          ],
          "additionalProperties": false
        },
        "lyrics": {
          "$ref": "#/$defs/lyrics"
        }
      },
      "required": [
        "urlSlug",
        "title",
        "subtitle",
        "bpm",
        "camelotKey",
        "leadProducer",
        "dedication",
        "dedicationSourceDoc",
        "durationDisplay",
        "durationIso8601",
        "primaryAlbumId",
        "trackNumber",
        "primaryTrackNumber",
        "bpmSpotify",
        "id",
        "canonicalUrl",
        "album",
        "primaryAlbum",
        "albumAppearances",
        "releaseDate",
        "firstReleaseDate",
        "hasSingleRelease",
        "single",
        "durationSeconds",
        "genres",
        "genreAssignments",
        "identifiers",
        "festival",
        "links",
        "lyrics"
      ],
      "additionalProperties": false
    }
  },
  "title": "Bobku Public Music Catalog JSON — schema 2.0.0",
  "description": "Closed metadata-only JSON contract. Full lyric text belongs only in the separately generated SQLite research distribution. Missing facts use null; original prose is retained."
}
