{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://luciocola.github.io/geospatial-building-block/1.0/schema/job-evidence.schema.json",
  "title": "GBB execution evidence",
  "description": "Minimum evidence a GBB returns for a job in a terminal state (requirement /req/core/evidence).",
  "type": "object",
  "required": [
    "jobID",
    "processID",
    "status",
    "inputs",
    "results",
    "validation"
  ],
  "properties": {
    "jobID": {
      "type": "string",
      "minLength": 1
    },
    "processID": {
      "type": "string",
      "minLength": 1
    },
    "status": {
      "enum": [
        "successful",
        "failed",
        "dismissed"
      ]
    },
    "inputs": {
      "description": "Input values or references exactly as submitted.",
      "type": "object"
    },
    "results": {
      "description": "Output references keyed by output name.",
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "required": [
          "href"
        ],
        "properties": {
          "href": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string"
          }
        }
      }
    },
    "validation": {
      "type": "object",
      "required": [
        "passed"
      ],
      "properties": {
        "passed": {
          "type": "boolean"
        },
        "report": {
          "type": "string",
          "description": "Reference to a detailed validation report, when produced."
        }
      }
    }
  }
}
