{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://shapes.penny.coop/post/2.0.0/schema.json",
  "title": "Post",
  "description": "The main Penny app’s full Post type: title, slug, excerpt, Content, cover image, status and publication date.",
  "type": "object",
  "properties": {
    "title": {
      "title": "Title",
      "type": "string",
      "x-penny": {
        "field": "text",
        "input": "text"
      }
    },
    "slug": {
      "title": "Slug",
      "type": "string",
      "x-penny": {
        "field": "text",
        "input": "text"
      }
    },
    "excerpt": {
      "title": "Excerpt",
      "type": "string",
      "x-penny": {
        "field": "textarea",
        "input": "textarea"
      }
    },
    "content": {
      "title": "Content",
      "$ref": "https://shapes.penny.coop/content-markdown/1.0.0/schema.json",
      "x-penny": {
        "field": "content",
        "storage": "markdown"
      }
    },
    "coverImage": {
      "title": "Cover Image",
      "type": "object",
      "properties": {
        "ref": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "ref"
      ],
      "description": "A project-local media reference; the file bytes and access permissions are stored separately.",
      "x-penny": {
        "field": "image"
      }
    },
    "status": {
      "title": "Status",
      "type": "string",
      "enum": [
        "draft",
        "published",
        "archived"
      ],
      "x-penny": {
        "field": "text",
        "input": "select",
        "options": [
          "draft",
          "published",
          "archived"
        ]
      }
    },
    "publishedAt": {
      "title": "Published At",
      "type": "string",
      "format": "date",
      "x-penny": {
        "field": "date",
        "input": "date"
      }
    }
  },
  "required": [
    "title",
    "slug"
  ],
  "x-penny": {
    "shape": "post",
    "version": "2.0.0",
    "source": "app/types/post.js",
    "sourceName": "post",
    "kind": "record",
    "plural": "Posts",
    "icon": "FileText",
    "group": "Public",
    "defaultVisibility": "private",
    "publishable": true,
    "fieldOrder": [
      "title",
      "slug",
      "excerpt",
      "content",
      "coverImage",
      "status",
      "publishedAt"
    ]
  }
}
