{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pageaudit/json-schema/pageaudit-badge-schema.json",
  "title": "Badge",
  "description": "The score badge metadata, to build the README markdown.",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pageaudit-badge-api-openapi.yml#/components/schemas/Badge",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string",
      "description": "Slug of the shared report."
    },
    "score": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Score shown in the badge."
    },
    "label": {
      "type": "string",
      "description": "Text on the left of the badge."
    },
    "available": {
      "type": "boolean",
      "description": "`false` when the share was revoked — the SVG turns grey `n/a`."
    },
    "markdown": {
      "type": "string",
      "description": "The markdown line ready to paste in the README."
    },
    "_links": {
      "type": "object",
      "description": "The SVG and the report."
    }
  },
  "required": [
    "slug",
    "score",
    "label",
    "available",
    "markdown",
    "_links"
  ]
}