{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mashprime-dev/json-schema/mashprime-dev-post-list-schema.json",
  "title": "PostList",
  "description": "Published posts, newest first.",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mashprime-dev-openapi.json#/components/schemas/PostList",
  "type": "object",
  "properties": {
    "count": {
      "type": "integer",
      "description": "Number of posts returned in this page.",
      "minimum": 0
    },
    "total": {
      "type": "integer",
      "description": "Number of published posts in all.",
      "minimum": 0
    },
    "offset": {
      "type": "integer",
      "description": "Posts skipped before this page.",
      "minimum": 0
    },
    "posts": {
      "type": "array",
      "description": "Posts, newest first.",
      "items": {
        "$ref": "#/$defs/Post"
      }
    }
  },
  "required": [
    "count",
    "total",
    "offset",
    "posts"
  ],
  "additionalProperties": false,
  "$defs": {
    "Post": {
      "type": "object",
      "description": "A published blog post.",
      "properties": {
        "slug": {
          "type": "string",
          "description": "URL-safe identifier; use with GET /api/v1/posts/{slug}.",
          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
        },
        "title": {
          "type": "string",
          "description": "Post title."
        },
        "description": {
          "type": "string",
          "description": "One- or two-sentence summary of the post."
        },
        "date": {
          "type": "string",
          "description": "Publication date (YYYY-MM-DD).",
          "format": "date"
        },
        "url": {
          "type": "string",
          "description": "Canonical HTML URL of the post.",
          "format": "uri"
        },
        "markdown_url": {
          "type": "string",
          "description": "URL of the post's raw markdown.",
          "format": "uri"
        }
      },
      "required": [
        "slug",
        "title",
        "description",
        "date",
        "url",
        "markdown_url"
      ],
      "additionalProperties": false
    }
  }
}