{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/carbon-arc/json-schema/carbon-arc-entity-response-schema.json",
  "title": "EntityResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/carbon-arc-ontology-internal-api-openapi.yml#/components/schemas/EntityResponse",
  "properties": {
    "total": {
      "type": "integer",
      "title": "Total"
    },
    "page": {
      "type": "integer",
      "title": "Page"
    },
    "size": {
      "type": "integer",
      "title": "Size"
    },
    "pages": {
      "type": "integer",
      "title": "Pages"
    },
    "entities": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/EntityResponseItem"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Entities"
    }
  },
  "type": "object",
  "required": [
    "total",
    "page",
    "size",
    "pages"
  ],
  "$defs": {
    "EntityResponseItem": {
      "properties": {
        "entity": {
          "type": "string",
          "title": "Entity"
        },
        "entity_domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Entity Domain",
          "default": ""
        },
        "entity_domain_label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Entity Domain Label",
          "default": ""
        },
        "entity_representation": {
          "type": "string",
          "title": "Entity Representation"
        },
        "entity_representation_label": {
          "type": "string",
          "title": "Entity Representation Label"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "entity_id": {
          "type": "integer",
          "title": "Entity Id"
        },
        "entity_id_key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Entity Id Key"
        },
        "figi_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Figi Code"
        },
        "metadata": {
          "anyOf": [
            {
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Metadata"
        },
        "relevance_score": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Relevance Score"
        },
        "carc_id": {
          "type": "integer",
          "title": "Carc Id",
          "description": "Alias for entity_id for backward compatibility.",
          "readOnly": true
        },
        "representation": {
          "type": "string",
          "title": "Representation",
          "description": "Alias for entity_representation for backward compatibility.",
          "readOnly": true
        }
      },
      "type": "object",
      "required": [
        "entity",
        "entity_representation",
        "entity_representation_label",
        "label",
        "entity_id",
        "carc_id",
        "representation"
      ],
      "title": "EntityResponseItem"
    }
  }
}