{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/thomson-reuters/main/json-schema/thomson-reuters-trta-athena-models-api-v4-datasets-dataset-schema.json",
  "title": "TRTA.Athena.Models.Api.V4.Datasets.Dataset",
  "description": "Represents a dataset in the system, including its name, year, period, purpose, type, and details of returns to be created.",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thomson-reuters-datasets-api-openapi.yml#/components/schemas/TRTA.Athena.Models.Api.V4.Datasets.Dataset",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of dataset"
    },
    "year": {
      "type": "integer",
      "description": "Year of dataset",
      "format": "int32"
    },
    "period": {
      "$ref": "#/$defs/TRTA.Athena.Models.Api.V4.Datasets.Period",
      "description": "Time period of the dataset"
    },
    "purpose": {
      "type": "string",
      "description": "Purpose of dataset"
    },
    "type": {
      "type": "string",
      "description": "Type of dataset"
    },
    "returnDetails": {
      "type": "array",
      "description": "List of details for each return to be created as part of the dataset.",
      "items": {
        "$ref": "#/$defs/TRTA.Athena.Models.Api.V4.Datasets.ReturnDetails"
      }
    }
  },
  "$defs": {
    "TRTA.Athena.Models.Api.V4.Datasets.Period": {
      "type": "object",
      "properties": {
        "startDate": {
          "type": "string",
          "description": "Start date of period"
        },
        "endDate": {
          "type": "string",
          "description": "End date of period"
        },
        "type": {
          "type": "string",
          "description": "Type of  period"
        }
      },
      "description": "Period of dataset"
    },
    "TRTA.Athena.Models.Api.V4.Datasets.ReturnDetails": {
      "type": "object",
      "description": "Detailed information for a return to be created within a dataset",
      "properties": {
        "entityId": {
          "type": "string",
          "description": "Unique identifier for the entity"
        },
        "templateId": {
          "type": "string",
          "description": "Unique identifier for the template"
        },
        "templateFamilyName": {
          "type": "string",
          "description": "Template family name"
        },
        "returnName": {
          "type": "string",
          "description": "Name of return"
        }
      }
    }
  }
}