{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/csiro/main/json-schema/csiro-casda-observation-validation-dto-schema.json",
  "title": "CasdaObservationValidationDTO",
  "description": "DTO of CASDA release task.",
  "x-generated": "2026-10-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/csiro-dap-api-v2-openapi.yml#/components/schemas/CasdaObservationValidationDTO",
  "type": "object",
  "properties": {
    "sbid": {
      "type": "integer",
      "format": "int32"
    },
    "observationId": {
      "type": "integer",
      "format": "int64"
    },
    "opalCode": {
      "type": "string"
    },
    "obsStartDateMillis": {
      "type": "integer",
      "format": "int64"
    },
    "principalFirstName": {
      "type": "string"
    },
    "principalLastName": {
      "type": "string"
    },
    "globalQualityLevel": {
      "type": "string"
    },
    "subTypes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CasdaDataProductSubTypeValidationDTO"
      }
    },
    "dataProducts": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CasdaDataProductValidationDTO"
      }
    },
    "validationNotes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CasdaValidationNoteDTO"
      }
    },
    "projectName": {
      "type": "string"
    },
    "taskTitle": {
      "type": "string"
    },
    "encapsulationFileIds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "validationReportUrl": {
      "type": "string"
    },
    "validationMetrics": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CasdaValidationMetricDTO"
      }
    }
  },
  "$defs": {
    "CasdaDataProductSubTypeValidationDTO": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "subType": {
          "type": "string"
        },
        "qualityLevel": {
          "type": "string"
        },
        "count": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "CasdaDataProductValidationDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "type": {
          "type": "string"
        },
        "subType": {
          "type": "string"
        },
        "identifier": {
          "type": "string"
        },
        "fileName": {
          "type": "string"
        },
        "qualityLevel": {
          "type": "string"
        }
      }
    },
    "CasdaValidationMetricDTO": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "status": {
          "type": "integer",
          "format": "int32"
        },
        "value": {
          "type": "number",
          "format": "double"
        }
      }
    },
    "CasdaValidationNoteDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64"
        },
        "userId": {
          "type": [
            "string",
            "null"
          ]
        },
        "userName": {
          "type": [
            "string",
            "null"
          ]
        },
        "content": {
          "type": [
            "string",
            "null"
          ]
        },
        "createdDate": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64"
        }
      }
    }
  }
}