{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cosuno/json-schema/cosuno-create-custom-catalog-input-schema.json",
  "title": "CreateCustomCatalogInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cosuno-company-api-openapi.yml#/components/schemas/CreateCustomCatalogInput",
  "properties": {
    "name": {
      "type": "string",
      "description": "Display name of the catalog."
    },
    "costGroups": {
      "items": {
        "$ref": "#/$defs/CreateCustomCatalogCostGroupInput"
      },
      "type": "array",
      "description": "Hierarchical cost groups that make up the catalog."
    }
  },
  "required": [
    "name",
    "costGroups"
  ],
  "type": "object",
  "additionalProperties": false,
  "$defs": {
    "CreateCustomCatalogCostGroupInput": {
      "properties": {
        "localId": {
          "type": "string",
          "description": "Stable identifier for the cost group within the catalog (e.g. a cost group code like `300` or `310.1`). Must be unique within the catalog."
        },
        "name": {
          "type": "string",
          "description": "Display name of the cost group."
        },
        "childCostGroups": {
          "items": {
            "$ref": "#/$defs/CreateCustomCatalogCostGroupInput"
          },
          "type": "array",
          "description": "Nested cost groups for a hierarchical catalog structure."
        }
      },
      "required": [
        "localId",
        "name"
      ],
      "type": "object",
      "additionalProperties": false
    }
  }
}