{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://rslquantum.com/quantum-india/schema/company.schema.json",
  "title": "Quantum India registry company row",
  "description": "One row of /quantum-india/data/companies.json. A company cited solely through a third-party copy of MCA data is not published. The flags nqm_aligned, dpiit_recognised and fitt_incubated are 1 when a cited source of the matching type supports them (pib, nqm or dst; dpiit; incubator) and 0 otherwise. A value of 0 means no such source is cited, not that the company lacks the status.",
  "type": "object",
  "required": ["cin", "legal_name", "display_name", "slug", "country", "category", "sources", "last_verified_at"],
  "properties": {
    "cin":              { "type": "string", "pattern": "^[LUF][0-9]{5}[A-Z]{2}[0-9]{4}[A-Z]{3}[0-9]{6}$" },
    "legal_name":       { "type": "string" },
    "display_name":     { "type": "string" },
    "slug":             { "type": "string", "pattern": "^[a-z0-9-]+$" },
    "domain":           { "type": "string" },
    "country":          { "const": "IN" },
    "state":            { "type": "string" },
    "city":             { "type": "string" },
    "incorporated_on":  { "type": "string" },
    "status":           { "type": "string" },
    "category":         { "type": "string" },
    "subdomain":        { "type": "string" },
    "founders": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name"],
        "properties": {
          "name":     { "type": "string" },
          "orcid":    { "type": "string" },
          "wikidata": { "type": "string" }
        },
        "additionalProperties": false
      }
    },
    "nqm_aligned":      { "enum": [0, 1], "description": "1 when a cited pib, nqm or dst source names the company under the National Quantum Mission." },
    "dpiit_recognised": { "enum": [0, 1], "description": "1 when a cited dpiit source records Startup India recognition." },
    "fitt_incubated":   { "enum": [0, 1], "description": "1 when a cited incubator source records incubation at FITT, IIT Delhi." },
    "description":      { "type": "string" },
    "sources": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": ["type", "label", "url"],
        "properties": {
          "type":        { "enum": ["mca", "pib", "nqm", "dst", "dpiit", "incubator", "publication", "patent", "mirror", "press", "other"], "description": "mirror is a third-party copy of MCA data; it supports entity details, not the quantum-work criterion." },
          "label":       { "type": "string" },
          "url":         { "type": ["string", "null"], "format": "uri" },
          "accessed_on": { "type": "string", "format": "date" }
        },
        "additionalProperties": false
      }
    },
    "last_verified_at": { "type": "string", "format": "date" }
  },
  "additionalProperties": false
}
