{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/needhave-io/json-schema/needhave-io-public-post-schema.json",
  "title": "PublicPost",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/needhave-io-openapi.json#/components/schemas/PublicPost",
  "type": "object",
  "required": [
    "id",
    "kind",
    "note",
    "replies"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "enum": [
        "need",
        "have"
      ]
    },
    "note": {
      "type": "string"
    },
    "source_url": {
      "type": "string"
    },
    "replies": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PublicReply"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "PublicReply": {
      "type": "object",
      "required": [
        "id",
        "text"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "text": {
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  }
}