{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://web-summit.newsroom.sgit.ai/data/schemas/company.schema.json",
  "title": "A company (data/companies/<id>/company.json)",
  "description": "Identity only, public facts only, each field with the sources that support it. Hand-edited; written first by admin/tools/companies.mjs.",
  "type": "object",
  "required": [
    "id",
    "type",
    "name",
    "website",
    "what",
    "category",
    "country",
    "attending",
    "attending_as",
    "field_sources",
    "aliases",
    "from"
  ],
  "properties": {
    "$schema": {
      "$ref": "common.schema.json#/$defs/schema_link"
    },
    "id": {
      "$ref": "common.schema.json#/$defs/slug"
    },
    "type": {
      "const": "company"
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "website": {
      "anyOf": [
        {
          "$ref": "common.schema.json#/$defs/url"
        },
        {
          "type": "null"
        }
      ],
      "description": "null where the team's map has no website"
    },
    "what": {
      "type": "string",
      "minLength": 1
    },
    "category": {
      "enum": [
        "ai-agents",
        "security",
        "devtools",
        "grc",
        "portugal-startup",
        "platform",
        "investor",
        "other"
      ]
    },
    "country": {
      "type": "string",
      "minLength": 1
    },
    "attending": {
      "type": "string",
      "minLength": 1
    },
    "attending_as": {
      "type": "string",
      "minLength": 1
    },
    "field_sources": {
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "string",
          "pattern": "^[a-z0-9-]+$"
        },
        "minItems": 1
      }
    },
    "field_sources_method": {
      "type": "string",
      "minLength": 1
    },
    "aliases": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "source",
          "how"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "how": {
            "type": "string",
            "minLength": 1
          },
          "hand": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    },
    "from": {
      "type": "object",
      "required": [
        "repository",
        "path",
        "read_on",
        "by"
      ],
      "properties": {
        "repository": {
          "type": "string",
          "minLength": 1
        },
        "path": {
          "type": "string",
          "minLength": 1
        },
        "read_on": {
          "$ref": "common.schema.json#/$defs/date"
        },
        "by": {
          "$ref": "common.schema.json#/$defs/agent"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
