{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://cleanplaystandards.org/schemas/registry-record.schema.json",
  "title": "Clean Play Public Registry API Record",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "credentialId",
    "organizationName",
    "productName",
    "status",
    "standardCode",
    "standardName",
    "scope",
    "issuedAt",
    "expiresAt",
    "updatedAt",
    "publicSummary",
    "statusReason",
    "verificationUrl",
    "jwsUrl",
    "badgeUrl"
  ],
  "properties": {
    "credentialId": {
      "type": "string"
    },
    "organizationName": {
      "type": "string"
    },
    "productName": {
      "type": "string"
    },
    "status": {
      "enum": [
        "active",
        "suspended",
        "expired",
        "revoked"
      ]
    },
    "standardCode": {
      "const": "CPS-MG-1.0"
    },
    "standardName": {
      "const": "Clean Play Standards 1.0: Mobile Games"
    },
    "scope": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "platforms",
        "packageIds",
        "versionScope",
        "regions",
        "limitations"
      ],
      "properties": {
        "platforms": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "packageIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "versionScope": {
          "type": "string"
        },
        "regions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "limitations": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "issuedAt": {
      "type": "string",
      "format": "date-time"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "publicSummary": {
      "type": "string",
      "maxLength": 5000
    },
    "statusReason": {
      "type": "string",
      "maxLength": 5000
    },
    "verificationUrl": {
      "type": "string",
      "format": "uri"
    },
    "jwsUrl": {
      "type": "string",
      "format": "uri"
    },
    "badgeUrl": {
      "type": "string",
      "format": "uri"
    }
  }
}
