{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
      "maxLength": 64
    },
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 70
    },
    "summary": {
      "type": "string",
      "minLength": 10,
      "maxLength": 160
    },
    "category": {
      "enum": [
        "Data & connectivity",
        "Visualization",
        "Operations",
        "Engineering",
        "AI & automation"
      ]
    },
    "tags": {
      "type": "array",
      "minItems": 1,
      "maxItems": 8,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 32
      }
    },
    "platforms": {
      "type": "array",
      "minItems": 1,
      "maxItems": 8,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 32
      }
    },
    "schema": {
      "const": "oic/project/v2"
    },
    "publisher": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "\\S"
        },
        "url": {
          "type": "string",
          "format": "https-url",
          "maxLength": 2048
        }
      },
      "required": [
        "name"
      ]
    },
    "description": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "text": {
              "type": "string",
              "minLength": 1,
              "maxLength": 20000,
              "pattern": "\\S"
            }
          },
          "required": [
            "text"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "file": {
              "type": "string",
              "pattern": "^\\./(?:[A-Za-z0-9_-]+/)*[A-Za-z0-9_-]+\\.md$",
              "maxLength": 240
            }
          },
          "required": [
            "file"
          ]
        }
      ]
    },
    "branding": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "logo": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "on_light": {
              "type": "string",
              "pattern": "^\\./(?:[A-Za-z0-9_-]+/)*[A-Za-z0-9_-]+\\.(?:png|jpg|jpeg|webp)$",
              "maxLength": 240
            },
            "on_dark": {
              "type": "string",
              "pattern": "^\\./(?:[A-Za-z0-9_-]+/)*[A-Za-z0-9_-]+\\.(?:png|jpg|jpeg|webp)$",
              "maxLength": 240
            },
            "alt": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "\\S"
            }
          },
          "required": [
            "on_light",
            "alt"
          ]
        }
      },
      "required": [
        "logo"
      ]
    },
    "media": {
      "type": "array",
      "maxItems": 8,
      "items": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                "maxLength": 64
              },
              "type": {
                "const": "image"
              },
              "src": {
                "type": "string",
                "pattern": "^\\./(?:[A-Za-z0-9_-]+/)*[A-Za-z0-9_-]+\\.(?:png|jpg|jpeg|webp|gif)$",
                "maxLength": 240
              },
              "alt": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300,
                "pattern": "\\S"
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80,
                "pattern": "\\S"
              },
              "caption": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300,
                "pattern": "\\S"
              },
              "credit": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300,
                "pattern": "\\S"
              },
              "rights": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500,
                "pattern": "\\S"
              }
            },
            "required": [
              "id",
              "type",
              "src",
              "alt"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                "maxLength": 64
              },
              "type": {
                "const": "video"
              },
              "url": {
                "type": "string",
                "format": "https-url",
                "maxLength": 2048
              },
              "poster": {
                "type": "string",
                "pattern": "^\\./(?:[A-Za-z0-9_-]+/)*[A-Za-z0-9_-]+\\.(?:png|jpg|jpeg|webp)$",
                "maxLength": 240
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "\\S"
              },
              "transcript": {
                "type": "string",
                "format": "https-url",
                "maxLength": 2048
              }
            },
            "required": [
              "id",
              "type",
              "url",
              "title"
            ]
          }
        ]
      }
    },
    "source": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "availability": {
          "enum": [
            "open-source",
            "source-available",
            "closed-source"
          ]
        },
        "repository": {
          "type": "string",
          "format": "https-url",
          "maxLength": 2048
        }
      },
      "required": [
        "availability"
      ]
    },
    "license": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "\\S"
        },
        "url": {
          "type": "string",
          "format": "https-url",
          "maxLength": 2048
        },
        "spdx_expression": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "pattern": "\\S"
        }
      },
      "required": [
        "name",
        "url"
      ]
    },
    "access": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "edition": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "\\S"
        },
        "cost": {
          "const": "free"
        },
        "notes": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1500,
          "pattern": "\\S"
        },
        "account_required": {
          "enum": [
            true,
            false,
            "unknown"
          ]
        }
      },
      "required": [
        "edition",
        "cost",
        "notes",
        "account_required"
      ]
    },
    "requirements": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "\\S"
          },
          "kind": {
            "enum": [
              "software",
              "hardware",
              "service"
            ]
          },
          "cost": {
            "enum": [
              "free",
              "paid",
              "optional-paid",
              "unknown"
            ]
          },
          "notes": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000,
            "pattern": "\\S"
          },
          "version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "\\S"
          },
          "url": {
            "type": "string",
            "format": "https-url",
            "maxLength": 2048
          },
          "applies_to": {
            "type": "array",
            "maxItems": 8,
            "items": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
              "maxLength": 64
            }
          }
        },
        "required": [
          "name",
          "kind",
          "cost",
          "notes"
        ]
      }
    },
    "actions": {
      "type": "array",
      "maxItems": 8,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "maxLength": 64
          },
          "type": {
            "enum": [
              "demo",
              "download",
              "install",
              "docs"
            ]
          },
          "url": {
            "type": "string",
            "format": "https-url",
            "maxLength": 2048
          },
          "primary": {
            "type": "boolean"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 70,
            "pattern": "\\S"
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "pattern": "\\S"
          }
        },
        "required": [
          "id",
          "type",
          "url",
          "primary"
        ]
      },
      "minItems": 1
    },
    "resources": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
            "maxLength": 64
          },
          "kind": {
            "enum": [
              "source",
              "download",
              "container",
              "document"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "\\S"
          },
          "url": {
            "type": "string",
            "format": "https-url",
            "maxLength": 2048
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500,
            "pattern": "\\S"
          },
          "format": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60,
            "pattern": "\\S"
          },
          "version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80,
            "pattern": "\\S"
          },
          "access": {
            "enum": [
              "public",
              "account-required",
              "see-provider"
            ]
          },
          "license": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "\\S"
              },
              "url": {
                "type": "string",
                "format": "https-url",
                "maxLength": 2048
              }
            },
            "required": [
              "name",
              "url"
            ]
          },
          "setup": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300,
            "pattern": "\\S"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{64}$"
          },
          "image": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/@-]{1,300}$",
            "maxLength": 301
          }
        },
        "required": [
          "id",
          "kind",
          "title",
          "url",
          "access"
        ]
      }
    },
    "links": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "homepage": {
          "type": "string",
          "format": "https-url",
          "maxLength": 2048
        },
        "docs": {
          "type": "string",
          "format": "https-url",
          "maxLength": 2048
        },
        "wiki": {
          "type": "string",
          "format": "https-url",
          "maxLength": 2048
        },
        "issues": {
          "type": "string",
          "format": "https-url",
          "maxLength": 2048
        },
        "discussions": {
          "type": "string",
          "format": "https-url",
          "maxLength": 2048
        },
        "changelog": {
          "type": "string",
          "format": "https-url",
          "maxLength": 2048
        },
        "support": {
          "type": "string",
          "format": "https-url",
          "maxLength": 2048
        }
      },
      "required": []
    },
    "faq": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "question": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "\\S"
          },
          "answer": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "pattern": "\\S"
          }
        },
        "required": [
          "question",
          "answer"
        ]
      }
    },
    "lifecycle": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "stage": {
          "enum": [
            "preview",
            "beta",
            "stable"
          ]
        },
        "maintenance": {
          "enum": [
            "active",
            "maintenance-only",
            "archived"
          ]
        }
      },
      "required": [
        "stage",
        "maintenance"
      ]
    },
    "release": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "version": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80,
          "pattern": "\\S"
        },
        "url": {
          "type": "string",
          "format": "https-url",
          "maxLength": 2048
        },
        "date": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        }
      },
      "required": [
        "version",
        "url"
      ]
    },
    "visibility": {
      "enum": [
        "listed",
        "withdrawn"
      ]
    },
    "discovery": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "primary": {
          "enum": [
            "connectivity",
            "visualization",
            "operations",
            "data",
            "automation",
            "development",
            "infrastructure",
            "security"
          ]
        },
        "secondary": {
          "type": "array",
          "items": {
            "enum": [
              "connectivity",
              "visualization",
              "operations",
              "data",
              "automation",
              "development",
              "infrastructure",
              "security"
            ]
          },
          "maxItems": 2,
          "uniqueItems": true
        },
        "capabilities": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "\\S"
          },
          "maxItems": 12,
          "uniqueItems": true
        },
        "product_type": {
          "enum": [
            "application",
            "tool",
            "demo",
            "extension",
            "resource",
            "library",
            "assets"
          ]
        },
        "interfaces": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "pattern": "\\S"
          },
          "maxItems": 12,
          "uniqueItems": true
        },
        "works_with": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "\\S"
              },
              "relationship": {
                "enum": [
                  "requires",
                  "integrates",
                  "exports"
                ]
              },
              "version": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "\\S"
              },
              "evidence_url": {
                "type": "string",
                "format": "https-url",
                "maxLength": 2048
              }
            },
            "required": [
              "name",
              "relationship"
            ]
          },
          "maxItems": 12,
          "uniqueItems": true
        },
        "options": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "resource_id": {
                "type": "string",
                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
              },
              "delivery": {
                "enum": [
                  "web",
                  "container",
                  "installer",
                  "module",
                  "project",
                  "source",
                  "assets"
                ]
              },
              "environments": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100,
                  "pattern": "\\S"
                },
                "maxItems": 12,
                "uniqueItems": true
              },
              "deployment": {
                "type": "array",
                "items": {
                  "enum": [
                    "local",
                    "server",
                    "cloud",
                    "hosted"
                  ]
                },
                "maxItems": 12,
                "uniqueItems": true
              }
            },
            "required": [
              "delivery",
              "environments",
              "deployment"
            ]
          },
          "maxItems": 12,
          "uniqueItems": true
        },
        "offline": {
          "enum": [
            "yes",
            "no",
            "unknown"
          ]
        },
        "air_gap": {
          "enum": [
            "documented",
            "no",
            "unknown"
          ]
        },
        "air_gap_url": {
          "type": "string",
          "format": "https-url",
          "maxLength": 2048
        },
        "commercial_use": {
          "enum": [
            "yes",
            "no",
            "unknown"
          ]
        },
        "support": {
          "type": "array",
          "items": {
            "enum": [
              "community",
              "publisher",
              "paid"
            ]
          },
          "maxItems": 12,
          "uniqueItems": true
        }
      },
      "required": [
        "primary"
      ]
    }
  },
  "required": [
    "schema",
    "id",
    "name",
    "summary",
    "category",
    "tags",
    "platforms",
    "publisher",
    "description",
    "source",
    "license",
    "access",
    "requirements",
    "actions",
    "lifecycle",
    "visibility"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://openindustrialcollective.org/data/project-v2.schema.json",
  "title": "OIC project profile v2"
}
