{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/datadog-software-catalog/_shared/latest--metadata.schema.json",
  "description": "Metadata fields common to all versions/kinds of an entity.",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/DataDog/schema/main/service-catalog/v3/metadata.schema.json",
    "sourceSha256": "e8d17d32330c163268e96e238fc6bd1b743417916826bdc39c4328dc8492b4ce"
  },
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "A read-only globally unique identifier for the entity generated by Datadog.  User supplied values are ignored.",
      "examples": [
        "4b163705-23c0-4573-b2fb-f6cea2163fcb"
      ],
      "minLength": 1
    },
    "inheritFrom": {
      "description": "The entity reference from which to inherit metadata",
      "examples": [
        "application:default/myapp"
      ],
      "type": "string"
    },
    "managed": {
      "type": "object",
      "description": "A read-only set of Datadog managed attributes generated by Datadog.  User supplied values are ignored.",
      "additionalProperties": true
    },
    "owner": {
      "description": "The owner of the entity, usually a team",
      "examples": [
        "myTeam"
      ],
      "type": "string"
    },
    "additionalOwners": {
      "description": "The additional owners of the entity, usually a team",
      "items": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "description": "Team name",
            "type": "string"
          },
          "type": {
            "description": "Team type",
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "type": "array",
      "additionalProperties": false
    },
    "name": {
      "type": "string",
      "description": "Unique name given to an entity under the kind/namespace ",
      "examples": [
        "myService"
      ],
      "minLength": 1
    },
    "description": {
      "type": "string",
      "description": "Short description of the entity. The UI can leverage the description for display"
    },
    "displayName": {
      "type": "string",
      "description": "User friendly name of the entity. The UI can leverage the displayName for display"
    },
    "tags": {
      "description": "A set of custom tags",
      "examples": [
        [
          "my:tag"
        ]
      ],
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "contacts": {
      "description": "A list of contacts for the entity",
      "items": {
        "required": [
          "type",
          "contact"
        ],
        "type": "object",
        "properties": {
          "name": {
            "description": "Contact name",
            "examples": [
              "Oncall Slack",
              "Team Email"
            ],
            "type": "string",
            "minLength": 2
          },
          "type": {
            "description": "Contact type. See examples for a list of recognizable types",
            "examples": [
              "email",
              "slack",
              "microsoft-teams"
            ],
            "type": "string"
          },
          "contact": {
            "description": "Contact value",
            "examples": [
              "contact@datadoghq.com",
              "https://my-org.slack.com/archives/my-channel"
            ],
            "type": "string"
          }
        },
        "if": {
          "properties": {
            "type": {
              "const": "email"
            }
          }
        },
        "then": {
          "properties": {
            "contact": {
              "format": "email"
            }
          }
        },
        "additionalProperties": false
      },
      "type": "array",
      "additionalProperties": false
    },
    "links": {
      "description": "A list of links for the entity",
      "items": {
        "required": [
          "name",
          "type",
          "url"
        ],
        "type": "object",
        "properties": {
          "name": {
            "description": "Link name",
            "examples": [
              "Runbook",
              "Dashboard"
            ],
            "type": "string"
          },
          "type": {
            "description": "Link type. See examples for a list of recognizable types",
            "examples": [
              "runbook",
              "doc",
              "repo",
              "dashboard",
              "other"
            ],
            "type": "string",
            "default": "other"
          },
          "url": {
            "description": "Link url",
            "examples": [
              "https://my-runbook"
            ],
            "type": "string",
            "format": "uri"
          },
          "provider": {
            "description": "Link provider. See examples for a list of recognizable providers",
            "examples": [
              "Github",
              "Confluence"
            ],
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "type": "array",
      "additionalProperties": false
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
