{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/thomson-reuters/main/json-schema/thomson-reuters-collection-version-dto-schema.json",
  "title": "CollectionVersionDTO",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thomson-reuters-collection-service-openapi.yml#/components/schemas/CollectionVersionDTO",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Unique identifier of the Collection",
      "format": "int32"
    },
    "name": {
      "type": "string",
      "description": "Label of the Collection"
    },
    "version": {
      "type": "integer",
      "description": "Version of the Collection",
      "format": "int32"
    },
    "records_count": {
      "type": "integer",
      "description": "Total records exist in collection",
      "format": "int64"
    },
    "status": {
      "type": "string",
      "description": "State of the published status",
      "enum": [
        "UNPUBLISHED",
        "PUBLISHING",
        "PUBLISHED",
        "UNPUBLISHING",
        "ERROR"
      ]
    },
    "blueprint": {
      "$ref": "#/$defs/BlueprintDTO"
    },
    "columns": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CollectionColumnDTO"
      }
    },
    "year": {
      "type": "integer",
      "description": "Relevant year of importance for the file data",
      "format": "int32"
    },
    "period": {
      "type": "integer",
      "description": "Numeric period of no specific precision",
      "format": "int32"
    },
    "created_date": {
      "type": "string",
      "description": "Version created date and time",
      "format": "date-time"
    },
    "created_by": {
      "type": "string"
    },
    "recordset_count": {
      "type": "integer",
      "format": "int32"
    }
  },
  "$defs": {
    "BlueprintDTO": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Unique identifier of the Blueprint",
          "format": "int32"
        },
        "version": {
          "type": "integer",
          "description": "Version of the Blueprint",
          "format": "int32"
        },
        "type_id": {
          "type": "integer",
          "description": "Unique identifier of the Blueprint type",
          "format": "int32"
        }
      }
    },
    "CollectionColumnDTO": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Label of the column"
        },
        "type": {
          "type": "string",
          "description": "Expected data type of the column values",
          "enum": [
            "currency",
            "date",
            "number",
            "string"
          ]
        },
        "index": {
          "type": "boolean"
        },
        "ontology_id": {
          "type": "integer",
          "description": "Unique identifier of the ontology this column represents",
          "format": "int32"
        },
        "is_required": {
          "type": "boolean",
          "description": "Requires templates to map this column"
        },
        "is_system": {
          "type": "boolean",
          "description": "Checks for system generated column"
        }
      }
    }
  }
}