{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://crypticpy.github.io/phct/examples/blank/submit/answers.schema.json",
  "title": "Your Catalog: answers for a new entry",
  "description": "The answers to the submission form at https://crypticpy.github.io/phct/examples/blank/submit/, one property per question, keyed by the question's key. Leave out any question you do not have an answer for. Files are not part of this JSON: the submitter attaches them on the submit page (or drags them into the GitHub issue).",
  "type": "object",
  "properties": {
    "title": {
      "title": "Title",
      "description": "What is it called? Short, descriptive name.",
      "type": "string",
      "minLength": 1
    },
    "summary": {
      "title": "One-sentence summary",
      "description": "In one or two sentences, what is it? One or two sentences shown on the catalog card. Plain language, no jargon.",
      "type": "string",
      "minLength": 1
    },
    "category": {
      "title": "Category",
      "description": "Which category does it belong to? Replace these options with your own categories.",
      "type": "string",
      "enum": [
        "Category one",
        "Category two",
        "Category three"
      ]
    },
    "tags": {
      "title": "Tags",
      "description": "What topics does it touch? Free-form tags, one per line or comma-separated. Each item is one line of its own. Never put a comma inside an item.",
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "pattern": "^[^,\\r\\n]+$"
      }
    },
    "body": {
      "title": "Details",
      "description": "Tell the full story. Markdown is supported.",
      "type": "string"
    },
    "link_url": {
      "title": "Link",
      "description": "Is there somewhere to send people? An external link for this entry, if there is one.",
      "type": "string",
      "format": "uri",
      "pattern": "^https?://\\S+$"
    },
    "resources": {
      "title": "Other links",
      "description": "Anything else worth linking? One per line as “Label | URL”. Each link is a short label and a web address.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "Short text saying where the link goes."
          },
          "url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https?://\\S+$"
          }
        },
        "required": [
          "url"
        ],
        "additionalProperties": false
      }
    },
    "screenshots": {
      "title": "Images",
      "description": "Do you have pictures of it? Optional. Drop images into the issue, or paste image URLs one per line. Only images already hosted at a public https address; each needs alt text of at most 125 characters saying what the screenshot shows. Files are not part of this JSON: the submitter attaches them on the submit page (or drags them into the GitHub issue).",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https?://\\S+$"
          },
          "alt": {
            "type": "string",
            "maxLength": 125
          }
        },
        "required": [
          "url"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "title",
    "summary"
  ],
  "additionalProperties": false
}
