{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/johnson-controls/json-schema/johnson-controls-standard-error-message-schema.json",
  "title": "Standard Error",
  "description": "A general error of the API.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/johnson-controls-time-series-api-openapi.yml#/components/schemas/standardErrorMessage",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "code",
    "message"
  ],
  "properties": {
    "code": {
      "type": "string",
      "description": "A Metasys specific status code. The format of this code is variable. It\nuses namespace/qualified format for `statusName` values. If the value is\nqualified with just an enumeration\n(\"{namespace}:{enumeration}.{member}\", e.g.\n\"enum.core:statusEnumSet.attributeNotFound\"), then the display text\ncomes from the enumeration schema available at\n`/schemas/enums/{enumeration}`. If the value is qualified with a\nnamespace (\"{namespace}:{enumeration}.{member}\", e.g.\n\"api.diagram:error.saveFailed\"), then the display text is the\nresponsibility of the client.\n"
    },
    "message": {
      "type": "string",
      "description": "The display string message that correlates to `statusName`."
    },
    "details": {
      "type": [
        "object",
        "null"
      ],
      "description": "An object containing specific details to the type of error. Each type of\nerror may have different detail properties and value types.\n"
    },
    "innerError": {
      "allOf": [
        {
          "description": "An error that is more detailed or a cause of the containing error.\nThis allows for a recursive error structure which a client can\ndigest to as much detail as they understand. This is mutually\nexclusive with `innerErrors`.\n"
        },
        {
          "$ref": "#/$defs/standardErrorMessage"
        }
      ]
    },
    "innerErrors": {
      "description": "A collection of errors that is more detailed or causes of the containing\nerror. This allows for a recursive error structure which a client can\ndigest to as much detail as they understand. This is mutually exclusive\nwith `innerError`.\n",
      "type": "array",
      "items": {
        "$ref": "#/$defs/standardErrorMessage"
      }
    }
  },
  "$defs": {
    "standardErrorMessage": {
      "title": "Standard Error",
      "description": "A general error of the API.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "type": "string",
          "description": "A Metasys specific status code. The format of this code is variable. It\nuses namespace/qualified format for `statusName` values. If the value is\nqualified with just an enumeration\n(\"{namespace}:{enumeration}.{member}\", e.g.\n\"enum.core:statusEnumSet.attributeNotFound\"), then the display text\ncomes from the enumeration schema available at\n`/schemas/enums/{enumeration}`. If the value is qualified with a\nnamespace (\"{namespace}:{enumeration}.{member}\", e.g.\n\"api.diagram:error.saveFailed\"), then the display text is the\nresponsibility of the client.\n"
        },
        "message": {
          "type": "string",
          "description": "The display string message that correlates to `statusName`."
        },
        "details": {
          "type": [
            "object",
            "null"
          ],
          "description": "An object containing specific details to the type of error. Each type of\nerror may have different detail properties and value types.\n"
        },
        "innerError": {
          "allOf": [
            {
              "description": "An error that is more detailed or a cause of the containing error.\nThis allows for a recursive error structure which a client can\ndigest to as much detail as they understand. This is mutually\nexclusive with `innerErrors`.\n"
            },
            {
              "$ref": "#/$defs/standardErrorMessage"
            }
          ]
        },
        "innerErrors": {
          "description": "A collection of errors that is more detailed or causes of the containing\nerror. This allows for a recursive error structure which a client can\ndigest to as much detail as they understand. This is mutually exclusive\nwith `innerError`.\n",
          "type": "array",
          "items": {
            "$ref": "#/$defs/standardErrorMessage"
          }
        }
      }
    }
  }
}