{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/companydata-dk/json-schema/companydata-dk-app-routers-reference-industry-list-response-schema.json",
  "title": "IndustryListResponse",
  "description": "Response with list of industries.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/companydata-dk-reference-data-api-openapi.yml#/components/schemas/app__routers__reference__IndustryListResponse",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/Industry"
      },
      "type": "array",
      "title": "Data",
      "description": "List of industries"
    },
    "meta": {
      "additionalProperties": true,
      "type": "object",
      "title": "Meta",
      "description": "Response metadata"
    }
  },
  "type": "object",
  "required": [
    "data",
    "meta"
  ],
  "$defs": {
    "Industry": {
      "properties": {
        "code": {
          "type": "string",
          "title": "Code",
          "description": "6-digit industry code (DB07)"
        },
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Industry name in selected locale"
        },
        "name_en": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name En",
          "description": "English industry name"
        },
        "count": {
          "type": "integer",
          "title": "Count",
          "description": "Total company count (primary + secondary)"
        },
        "primary_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Primary Count",
          "description": "Companies with this as primary industry"
        },
        "secondary_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Secondary Count",
          "description": "Companies with this as secondary industry"
        },
        "active_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Active Count",
          "description": "Active companies with this as primary industry; null until computed, 0 for a retired code"
        },
        "division": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Division",
          "description": "2-digit industry category (division) the code belongs to"
        }
      },
      "type": "object",
      "required": [
        "code",
        "name",
        "count"
      ],
      "title": "Industry",
      "description": "Industry data for dropdown/filter."
    }
  }
}