{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://caomengxuan666.github.io/schemas/blog-post.schema.json",
  "title": "BlogPostDraft",
  "type": "object",
  "required": ["title", "description", "date", "slug", "tags", "body", "sources"],
  "properties": {
    "title": {
      "type": "string",
      "minLength": 6
    },
    "description": {
      "type": "string",
      "minLength": 20
    },
    "date": {
      "type": "string",
      "format": "date"
    },
    "updated": {
      "type": "string",
      "format": "date"
    },
    "slug": {
      "type": "string",
      "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
    },
    "tags": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z0-9_.+-]+$"
      }
    },
    "body": {
      "type": "string",
      "minLength": 200
    },
    "sources": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "format": "uri"
      }
    }
  }
}
