{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/indexagentica-com/json-schema/indexagentica-com-longform-item-schema.json",
  "title": "LongformItem",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/indexagentica-com-openapi.json#/components/schemas/LongformItem",
  "allOf": [
    {
      "$ref": "#/$defs/LongformSummary"
    },
    {
      "type": "object",
      "properties": {
        "front_matter": {
          "type": "object"
        },
        "markdown": {
          "type": "string",
          "description": "Body with scheme links resolved to absolute URLs"
        },
        "raw": {
          "type": "string",
          "description": "Full file as published (front matter plus body)"
        },
        "html": {
          "type": "string"
        },
        "comparison": {
          "type": "object",
          "description": "Comparisons: subjects, criteria, table (one row per entry with values per criterion) and verdict"
        },
        "stack": {
          "type": "object",
          "description": "Stacks: use_case and components (role, entry, name, url, why)",
          "properties": {
            "use_case": {
              "type": "string"
            },
            "components": {
              "type": "array",
              "items": {
                "type": "object"
              }
            }
          }
        },
        "entries_detail": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "related": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "sources": {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      }
    }
  ],
  "$defs": {
    "LongformLinks": {
      "type": "object",
      "properties": {
        "html": {
          "type": "string",
          "format": "uri"
        },
        "markdown": {
          "type": "string",
          "format": "uri"
        },
        "json": {
          "type": "string",
          "format": "uri"
        },
        "source": {
          "type": "string",
          "format": "uri"
        },
        "skill_md": {
          "type": "string",
          "format": "uri"
        },
        "zip": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "LongformSummary": {
      "type": "object",
      "required": [
        "type",
        "id",
        "title",
        "links"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "guide",
            "comparison",
            "stack",
            "skill"
          ]
        },
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        },
        "author": {
          "type": "string"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "published": {
          "type": "string",
          "format": "date"
        },
        "updated": {
          "type": "string",
          "format": "date"
        },
        "last_verified": {
          "type": "string",
          "format": "date"
        },
        "entries": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Directory entry ids this item references"
        },
        "links": {
          "$ref": "#/$defs/LongformLinks"
        }
      }
    }
  }
}