{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "http://asyncapi.com/definitions/3.1.0/correlationId.json",
  "description": "An object that specifies an identifier at design time that can used for message tracing and correlation.",
  "type": "object",
  "required": [ "location" ],
  "properties": {
    "description": {
      "description": "A optional description of the correlation ID. GitHub Flavored Markdown is allowed.",
      "type": "string"
    },
    "location": {
      "description": "A runtime expression that specifies the location of the correlation ID",
      "type": "string",
      "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"
    }
  },
  "patternProperties": {
    "^x-[\\w\\d\\.\\x2d_]+$": {
      "$ref": "http://asyncapi.com/definitions/3.1.0/specificationExtension.json"
    }
  },
  "additionalProperties": false,
  "example": {
    "$ref": "http://asyncapi.com/examples/3.1.0/correlationId.json"
  }
}
