{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hmcts/json-schema/hmcts-result-get-dto-schema.json",
  "title": "result-get-dto",
  "description": "Response payload to get an Application List Entry Result.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hmcts-application-list-entry-results-api-openapi.yml#/components/schemas/result-get-dto",
  "properties": {
    "id": {
      "description": "Unique identifier of the Application List Entry Result.",
      "format": "uuid",
      "type": "string"
    },
    "entryId": {
      "description": "The Unique identifier of the parent Application List Entry belongs.",
      "format": "uuid",
      "type": "string"
    },
    "resultCode": {
      "description": "Code that identifies the Result Code.",
      "type": "string"
    },
    "updatedDateTime": {
      "description": "Date and time the Application List Entry Result was last updated.",
      "format": "date-time",
      "type": "string"
    },
    "wording": {
      "$ref": "#/$defs/template-detail"
    }
  },
  "required": [
    "entryId",
    "id",
    "resultCode",
    "updatedDateTime"
  ],
  "type": "object",
  "$defs": {
    "template-constraint": {
      "description": "The template field with an associated value",
      "properties": {
        "type": {
          "description": "The data type of the value.",
          "enum": [
            "TEXT"
          ],
          "type": "string"
        },
        "length": {
          "description": "The length of the data value.",
          "type": "integer"
        }
      },
      "required": [
        "length",
        "type"
      ],
      "type": "object"
    },
    "template-detail": {
      "description": "The wording details",
      "properties": {
        "template": {
          "description": "The template name. It contains the field names between curly braces.",
          "type": "string"
        },
        "substitution-key-constraints": {
          "description": "A list of fields and the associated constraints",
          "items": {
            "$ref": "#/$defs/template-key-with-constraint"
          },
          "type": "array"
        }
      },
      "required": [
        "template"
      ],
      "type": "object"
    },
    "template-key-with-constraint": {
      "description": "The template field with an associated value",
      "properties": {
        "key": {
          "description": "Field key for substitution into the template.",
          "type": "string"
        },
        "value": {
          "description": "The optional value for the key.",
          "type": "string"
        },
        "constraint": {
          "allOf": [
            {
              "$ref": "#/$defs/template-constraint"
            }
          ],
          "description": "The constraint details for the field"
        }
      },
      "required": [
        "constraint",
        "key"
      ],
      "type": "object"
    }
  }
}