{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zairalabs-ai/json-schema/zairalabs-ai-library-detail-schema.json",
  "title": "LibraryDetail",
  "description": "A library's entry (entryKind `library`), returned by GET /tools/{slug} and GET /compare for a library slug: the package and its install line, steward, licence, the latest release and the major lines still supported, breaking changes by release (each with readable release-notes links), runtime requirements, security advisory counts, lifecycle, and when to use it and when not. Carries none of a tool's pricing, deployment or agent-readiness fields.",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/klaxon-api-guide-openapi.json#/components/schemas/LibraryDetail",
  "type": "object",
  "required": [
    "entryKind",
    "slug",
    "name"
  ],
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "library"
      ],
      "description": "Kept for symmetry with LanguageDetail; entryKind is the catalog-wide field."
    },
    "entryKind": {
      "type": "string",
      "enum": [
        "library"
      ]
    },
    "slug": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "tagline": {
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "category": {
      "type": [
        "string",
        "null"
      ],
      "description": "The topic the library belongs to, for example `http-clients`."
    },
    "ecosystem": {
      "type": [
        "string",
        "null"
      ],
      "description": "The package registry the library is published to, for example `pypi` or `npm`."
    },
    "package": {
      "type": [
        "object",
        "null"
      ],
      "description": "The package's name and registry page."
    },
    "install": {
      "type": [
        "string",
        "null"
      ],
      "description": "The command that installs the library."
    },
    "language": {
      "type": [
        "string",
        "null"
      ],
      "description": "Slug of the language entry the library is written for."
    },
    "steward": {
      "type": [
        "object",
        "null"
      ],
      "description": "Who maintains the library."
    },
    "license": {
      "type": [
        "string",
        "null"
      ]
    },
    "licenseStatement": {
      "type": [
        "object",
        "null"
      ],
      "description": "For a license with a part SPDX has no id for (a dual or commercial offer, named with a `LicenseRef-` in `license`): the project's own words (`text`) and where to read them (`url`)."
    },
    "latestVersion": {
      "type": [
        "object",
        "null"
      ],
      "description": "The newest release from the registry: version and release date."
    },
    "majors": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Major lines, newest first, with their support state."
    },
    "runtimeRequirements": {
      "type": [
        "object",
        "null"
      ],
      "description": "Language and runtime versions the latest release needs."
    },
    "deprecation": {
      "type": [
        "object",
        "null"
      ],
      "description": "Whether the registry marks the package deprecated, and its message."
    },
    "breakingChanges": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Breaking changes by release; `releaseNotes` carries readable links to the notes."
    },
    "typesShipped": {
      "type": [
        "object",
        "boolean",
        "null"
      ],
      "description": "Whether the package ships its own type definitions."
    },
    "provenance": {
      "type": [
        "object",
        "null"
      ],
      "description": "Whether releases carry build provenance."
    },
    "supportedRuntimes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "useWhen": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "avoidWhen": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "bestFor": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tradeoffs": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "alternatives": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "worksWith": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "githubStars": {
      "type": [
        "integer",
        "null"
      ]
    },
    "contributorCount": {
      "type": [
        "integer",
        "null"
      ]
    },
    "busFactor": {
      "type": [
        "integer",
        "number",
        "null"
      ]
    },
    "lastCommit": {
      "type": [
        "string",
        "null"
      ]
    },
    "openssfScorecard": {
      "type": [
        "number",
        "object",
        "null"
      ]
    },
    "monthlyDownloads": {
      "type": [
        "integer",
        "null"
      ]
    },
    "dependentPackages": {
      "type": [
        "integer",
        "null"
      ]
    },
    "securityAdvisories": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Count of published advisories."
    },
    "securityAdvisoryIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "securityAdvisoriesUrl": {
      "type": [
        "string",
        "null"
      ]
    },
    "lifecycle": {
      "type": [
        "object",
        "null"
      ],
      "description": "Lifecycle status (for example `ended`) with a note."
    },
    "url": {
      "type": [
        "string",
        "null"
      ]
    },
    "docsUrl": {
      "type": [
        "string",
        "null"
      ]
    },
    "repository": {
      "type": [
        "string",
        "null"
      ]
    },
    "faqs": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "lastVerified": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO date the entry was last checked against live sources."
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The kinds of source the values come from, the same list for every library; the guide does not list per-entry source addresses."
    }
  }
}