{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hmcts/json-schema/hmcts-result-update-dto-schema.json",
  "title": "result-update-dto",
  "description": "Request payload to update an Application List Entry Result. Blank fields will be rejected, nulls should be used instead.",
  "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-update-dto",
  "additionalProperties": false,
  "properties": {
    "resultCode": {
      "description": "Code that identifies the Result Code.",
      "maxLength": 10,
      "minLength": 1,
      "type": "string"
    },
    "wordingFields": {
      "description": "An array of user-provided values used to populate placeholders in the 'wording'. The wording is a field belonging to the linked Result Code. Each string is applied to the wording in the order they are provided.\n",
      "items": {
        "$ref": "#/$defs/template-substitution"
      },
      "type": "array"
    }
  },
  "required": [
    "resultCode"
  ],
  "type": "object",
  "$defs": {
    "template-substitution": {
      "additionalProperties": false,
      "description": "The template field with the associated value to substitute. Blank fields will be rejected, nulls should be used instead.",
      "properties": {
        "key": {
          "description": "Field key for substitution into the template.",
          "minLength": 1,
          "type": "string"
        },
        "value": {
          "description": "The field value to substitute into the template key. Braces and line breaks are not permitted.",
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "key",
        "value"
      ],
      "type": "object"
    }
  }
}