{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/akahu/main/json-schema/akahu-category-schema.json",
  "title": "Category",
  "x-generated": "2026-10-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/akahu-categories-api-openapi.yml#/components/schemas/Category",
  "type": "object",
  "properties": {
    "_id": {
      "type": "string",
      "description": "The NZFCC Category ID"
    },
    "name": {
      "type": "string",
      "description": "The NZFCC Category name"
    },
    "groups": {
      "$ref": "#/$defs/CategoryGroups"
    }
  },
  "$defs": {
    "CategoryGroups": {
      "type": "object",
      "description": "Higher level groupings that a category belongs to.",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "The ID for this group of categories"
          },
          "name": {
            "type": "string",
            "description": "The name of this group of categories"
          }
        }
      }
    }
  }
}