{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/thomson-reuters/main/json-schema/thomson-reuters-create-comparisons-request-schema.json",
  "title": "CreateComparisonsRequest",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thomson-reuters-datahub-query-comparisons-service-openapi.yml#/components/schemas/CreateComparisonsRequest",
  "required": [
    "compared",
    "selected",
    "status"
  ],
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "description": "Status of the comparison process",
      "enum": [
        "STAGED",
        "STARTED",
        "PROCESSING",
        "COMPLETE"
      ]
    },
    "selected": {
      "$ref": "#/$defs/DatasetDTO"
    },
    "compared": {
      "$ref": "#/$defs/DatasetDTO"
    }
  },
  "$defs": {
    "DatasetDTO": {
      "required": [
        "key",
        "name",
        "source"
      ],
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "Source of the details of this dataset",
          "enum": [
            "DATAHUB_TOPIC",
            "DATAHUB_COLLECTION_VERSION"
          ]
        },
        "name": {
          "type": "string",
          "description": "Name of the dataset"
        },
        "key": {
          "type": "string",
          "description": "Unique identifier of the dataset from SOURCE"
        },
        "index_columns": {
          "type": "array",
          "description": "Array of column indexes that match selected and compared dataset",
          "items": {
            "type": "integer",
            "description": "Array of column indexes that match selected and compared dataset",
            "format": "int32"
          }
        },
        "compare_columns": {
          "type": "array",
          "description": "Array of column indexes on which comparison is performed",
          "items": {
            "type": "integer",
            "description": "Array of column indexes on which comparison is performed",
            "format": "int32"
          }
        },
        "context_columns": {
          "type": "array",
          "description": "Array of column indexes which provides additional information to the comparison data",
          "items": {
            "type": "integer",
            "description": "Array of column indexes which provides additional information to the comparison data",
            "format": "int32"
          }
        }
      }
    }
  }
}