{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/farmos/json-schema/farmos-taxonomy-collection-schema.json",
  "title": "TaxonomyCollection",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/farmos-taxonomy-api-openapi.yml#/components/schemas/TaxonomyCollection",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TaxonomyTermData"
      }
    },
    "links": {
      "type": "object"
    },
    "meta": {
      "type": "object",
      "properties": {
        "count": {
          "type": "integer"
        }
      }
    }
  },
  "$defs": {
    "JsonApiLinks": {
      "type": "object",
      "properties": {
        "self": {
          "type": "string",
          "format": "uri"
        },
        "related": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "TaxonomyTermAttributes": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Taxonomy term name"
        },
        "description": {
          "type": "object",
          "properties": {
            "value": {
              "type": "string"
            },
            "format": {
              "type": "string"
            }
          }
        },
        "weight": {
          "type": "integer"
        },
        "drupal_internal__tid": {
          "type": "integer",
          "readOnly": true
        }
      }
    },
    "TaxonomyTermData": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "JSON:API resource type (e.g., taxonomy_term--plant_type)"
        },
        "id": {
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "attributes": {
          "$ref": "#/$defs/TaxonomyTermAttributes"
        },
        "links": {
          "$ref": "#/$defs/JsonApiLinks"
        }
      }
    }
  }
}