{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openship.dev/schemas/sources-bundle.schema.json",
  "title": "OpenShip Sources v1 bundle",
  "type": "object",
  "required": ["openship", "capability", "digest", "files"],
  "properties": {
    "openship": { "const": "1.0" },
    "capability": { "const": "sources" },
    "generatedAt": { "type": "string", "format": "date-time" },
    "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
    "files": {
      "type": "object",
      "propertyNames": { "type": "string", "minLength": 1, "maxLength": 512, "pattern": "^(?!/)(?!.*\\\\)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)[^\\u0000]+$" },
      "additionalProperties": {
        "type": "object",
        "required": ["encoding", "content"],
        "properties": {
          "encoding": { "enum": ["utf-8", "base64"] },
          "content": { "type": "string" }
        },
        "additionalProperties": true
      }
    }
  },
  "additionalProperties": true
}
