{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/minoa-io/json-schema/minoa-io-post-schema.json",
  "title": "Post",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/minoa-io-openapi.json#/components/schemas/Post",
  "allOf": [
    {
      "$ref": "#/$defs/PostSummary"
    },
    {
      "type": "object",
      "required": [
        "content"
      ],
      "properties": {
        "content_format": {
          "type": "string",
          "const": "markdown"
        },
        "content": {
          "type": "string",
          "description": "The full body as Markdown."
        }
      }
    }
  ],
  "$defs": {
    "PostSummary": {
      "type": "object",
      "required": [
        "slug",
        "title",
        "description",
        "date",
        "url"
      ],
      "properties": {
        "slug": {
          "type": "string",
          "description": "URL-safe identifier for the post."
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "date": {
          "type": "string",
          "format": "date",
          "description": "Publication date, ISO 8601."
        },
        "last_updated": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "category": {
          "type": [
            "string",
            "null"
          ],
          "description": "Editorial tag. Only blog posts carry one, and only these four values; library posts (`surface: \"resources\"`) are deliberately unlabelled and return null.",
          "enum": [
            "Customer Stories",
            "Articles",
            "Engineering",
            "Announcements",
            null
          ]
        },
        "surface": {
          "type": "string",
          "enum": [
            "blog",
            "resources"
          ],
          "description": "Which hub publishes the post: `blog` for writing by the Minoa team, `resources` for the reference library of comparisons and definitions."
        },
        "author": {
          "type": [
            "string",
            "null"
          ]
        },
        "image_url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Canonical page for the post."
        },
        "api_url": {
          "type": "string",
          "format": "uri",
          "description": "This API's URL for the full post."
        }
      }
    }
  }
}