{
  "$schema": "http://json-schema.org/draft-07/schema",
  "$id": "Entity",
  "description": "The parts of the format that's common to all versions/kinds of entity.",
  "examples": [
    {
      "apiVersion": "backstage.io/v1alpha1",
      "kind": "Component",
      "metadata": {
        "name": "LoremService",
        "description": "Creates Lorems like a pro.",
        "labels": {
          "product_name": "Random value Generator"
        },
        "annotations": {
          "docs": "https://github.com/..../tree/develop/doc"
        }
      },
      "spec": {
        "type": "service",
        "lifecycle": "production",
        "owner": "tools"
      }
    }
  ],
  "type": "object",
  "required": ["apiVersion", "kind", "metadata"],
  "additionalProperties": false,
  "properties": {
    "apiVersion": {
      "type": "string",
      "description": "The version of specification format for this particular entity that this is written against.",
      "minLength": 1,
      "examples": ["backstage.io/v1alpha1", "my-company.net/v1", "1.0"]
    },
    "kind": {
      "type": "string",
      "description": "The high level entity type being described.",
      "minLength": 1,
      "examples": [
        "API",
        "Component",
        "Domain",
        "Group",
        "Location",
        "Resource",
        "System",
        "Template",
        "User"
      ]
    },
    "metadata": {
      "$ref": "EntityMeta"
    },
    "spec": {
      "type": "object",
      "description": "The specification data describing the entity itself."
    },
    "relations": {
      "type": "array",
      "description": "The relations that this entity has with other entities.",
      "items": {
        "$ref": "common#relation"
      }
    },
    "status": {
      "$ref": "common#status"
    }
  }
}
