{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/justblogged-com/json-schema/justblogged-com-post-schema.json",
  "title": "Post",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/justblogged-com-openapi.yml#/components/schemas/Post",
  "type": "object",
  "required": [
    "id",
    "title",
    "url",
    "slug",
    "content",
    "excerpt",
    "status",
    "created_at",
    "author",
    "tags",
    "metadata"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "slug": {
      "type": "string"
    },
    "content": {
      "type": "string",
      "description": "HTML content"
    },
    "excerpt": {
      "type": "string",
      "description": "Auto-generated excerpt from content or metadata.description"
    },
    "image": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "published",
        "scheduled"
      ],
      "description": "scheduled is derived from published status with future published_at"
    },
    "published_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "updated_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "author": {
      "$ref": "#/$defs/Author"
    },
    "collection": {
      "oneOf": [
        {
          "$ref": "#/$defs/CollectionRef"
        },
        {
          "type": "null"
        }
      ]
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TagRef"
      }
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Custom metadata fields (max 20 fields)"
    }
  },
  "$defs": {
    "Author": {
      "type": "object",
      "required": [
        "id",
        "name",
        "bio",
        "metadata",
        "url"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "bio": {
          "type": "string"
        },
        "image": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Public custom author metadata (max 20 fields)"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Public author page URL"
        }
      }
    },
    "CollectionRef": {
      "type": "object",
      "required": [
        "id",
        "name",
        "slug",
        "url"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "TagRef": {
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    }
  }
}