{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/dwp-exchange-gateway/_shared/latest--correlation-id-plugin-schema.json",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/dwp/schemas/main/exchange/publishing-tools/plugins/correlation-id/correlation-id-plugin-schema.json",
    "sourceSha256": "0f3f4b1abc6bdbfa18472a54e1ade96cc558ef050cf1016d25633327d7ff0f11"
  },
  "oneOf": [
    {
      "type": "string",
      "title": "Correlation ID plugin",
      "minLength": 2,
      "maxLength": 50,
      "default": "trackingId",
      "description": "Injects a header into a request. Useful for tracing request across tech stack."
    },
    {
      "type": "object",
      "title": "Correlation ID plugin",
      "description": "Injects a header into a request. Useful for tracing request across tech stack.",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 2,
          "maxLength": 50,
          "default": "trackingId"
        },
        "generator": {
          "type": "string",
          "default": "uuid#counter"
        },
        "echo_downstream": {
          "type": "boolean",
          "default": false
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    }
  ]
}
