{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Andrew Kenney Photogrammetry Case",
  "type": "object",
  "required": [
    "id",
    "title",
    "status",
    "capture",
    "source",
    "solve",
    "display",
    "measurement",
    "outcome"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9-]+$"
    },
    "title": {
      "type": "string"
    },
    "status": {
      "enum": [
        "draft",
        "review",
        "verified"
      ]
    },
    "capture": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "enum": [
            "object",
            "person",
            "interior",
            "landscape",
            "mission-imagery",
            "video",
            "other"
          ]
        },
        "instrument": {
          "type": [
            "string",
            "null"
          ]
        },
        "date": {
          "type": [
            "string",
            "null"
          ]
        },
        "sol": {
          "type": [
            "integer",
            "null"
          ]
        },
        "flight": {
          "type": [
            "integer",
            "string",
            "null"
          ]
        }
      }
    },
    "source": {
      "type": "object",
      "required": [
        "owner",
        "status",
        "references"
      ],
      "properties": {
        "owner": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "enum": [
            "unverified",
            "filename-verified",
            "catalog-matched",
            "source-matched"
          ]
        },
        "references": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "processing": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "solve": {
      "type": "object",
      "required": [
        "project",
        "chunk",
        "component",
        "camera_count"
      ],
      "properties": {
        "project": {
          "type": [
            "string",
            "null"
          ]
        },
        "chunk": {
          "type": [
            "integer",
            "string",
            "null"
          ]
        },
        "component": {
          "type": [
            "integer",
            "string",
            "null"
          ]
        },
        "camera_count": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "mesh": {
          "type": [
            "string",
            "null"
          ]
        },
        "camera_table": {
          "type": [
            "string",
            "null"
          ]
        },
        "omissions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "display": {
      "type": "object",
      "required": [
        "aspect_ratio",
        "geometry_policy"
      ],
      "properties": {
        "aspect_ratio": {
          "const": "1:1"
        },
        "geometry_policy": {
          "const": "preserve-relative-positions"
        },
        "poster": {
          "type": [
            "string",
            "null"
          ]
        },
        "film": {
          "type": [
            "string",
            "null"
          ]
        },
        "viewer": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "measurement": {
      "type": "object",
      "required": [
        "kind",
        "unit",
        "physical_scale",
        "time_basis"
      ],
      "properties": {
        "kind": {
          "enum": [
            "none",
            "frame-displacement",
            "pointing-rate",
            "model-unit-rate",
            "metric-rate"
          ]
        },
        "unit": {
          "type": [
            "string",
            "null"
          ]
        },
        "physical_scale": {
          "type": [
            "number",
            "null"
          ]
        },
        "time_basis": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "outcome": {
      "type": "object",
      "required": [
        "kind",
        "asset",
        "pairing_status"
      ],
      "properties": {
        "kind": {
          "enum": [
            "unassigned",
            "mesh",
            "camera-space-film",
            "artwork",
            "physical-object",
            "other"
          ]
        },
        "asset": {
          "type": [
            "string",
            "null"
          ]
        },
        "pairing_status": {
          "enum": [
            "unverified",
            "same-study-family",
            "same-saved-solve",
            "revision-matched"
          ]
        }
      }
    }
  }
}