{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "OpenAgentWorks projection",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "path": {
      "type": "string",
      "minLength": 1
    },
    "media_type": {
      "type": "string",
      "minLength": 1
    },
    "encoding": {
      "enum": [
        "utf8",
        "base64"
      ]
    },
    "content": {
      "type": "string"
    },
    "sha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "source_paths": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "source_snapshot_sha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "generator": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "version": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "name",
        "version"
      ],
      "additionalProperties": false
    },
    "normative": {
      "const": false
    }
  },
  "required": [
    "id",
    "path",
    "media_type",
    "encoding",
    "content",
    "sha256",
    "source_paths",
    "source_snapshot_sha256",
    "generator",
    "normative"
  ],
  "additionalProperties": false
}
