{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://living-bread.org/protocol/v0.1/need.schema.json",
  "title": "Kingdom Protocol v0.1: Need",
  "description": "A real need a ministry published and The Living Bread reviewed and verified. A city and a country, never coordinates.",
  "type": "object",
  "required": [
    "id",
    "title"
  ],
  "properties": {
    "id": {
      "description": "Stable id",
      "type": "string",
      "format": "uuid"
    },
    "title": {
      "description": "What is needed",
      "type": "string"
    },
    "description": {
      "description": "Up to 3,000 characters",
      "type": [
        "string",
        "null"
      ]
    },
    "category": {
      "description": "Category",
      "type": [
        "string",
        "null"
      ]
    },
    "urgency": {
      "description": "Urgency",
      "type": [
        "string",
        "null"
      ]
    },
    "city": {
      "description": "City",
      "type": [
        "string",
        "null"
      ]
    },
    "region": {
      "description": "Region",
      "type": [
        "string",
        "null"
      ]
    },
    "country": {
      "description": "Country",
      "type": [
        "string",
        "null"
      ]
    },
    "local": {
      "description": "Can be met in person",
      "type": [
        "boolean",
        "null"
      ]
    },
    "remote": {
      "description": "Can be met from anywhere",
      "type": [
        "boolean",
        "null"
      ]
    },
    "funding": {
      "description": "Can be met by giving",
      "type": [
        "boolean",
        "null"
      ]
    },
    "quantity": {
      "description": "How many are needed",
      "type": [
        "integer",
        "null"
      ]
    },
    "fulfilled_count": {
      "description": "How many are met",
      "type": [
        "integer",
        "null"
      ]
    },
    "status": {
      "description": "open, matching, in_progress or fulfilled",
      "type": [
        "string",
        "null"
      ]
    },
    "verification": {
      "description": "Always verified in the protocol",
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "description": "Created",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "fulfilled_at": {
      "description": "Met",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "updated_at": {
      "description": "Last change",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "ministry": {
      "description": "id, slug, name, verified",
      "type": [
        "object",
        "null"
      ]
    }
  },
  "additionalProperties": true,
  "x-lb-urn": "lb:need:<uuid>",
  "x-lb-schema-org": "https://schema.org/Demand",
  "x-lb-door": "/api/need/{uuid}, /api/needs",
  "x-lb-license": "Directory data CC BY 4.0. Words written by people remain theirs; quote with attribution."
}