{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CollectionSchema",
  "title": "CollectionSchema",
  "type": "object",
  "required": [
    "name",
    "fields"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the collection."
    },
    "fields": {
      "type": "array",
      "description": "Array of field definitions for the collection schema.",
      "items": {
        "$ref": "#/components/schemas/Field"
      }
    },
    "default_sorting_field": {
      "type": "string",
      "description": "Name of the field to sort by when no sort_by parameter is specified."
    },
    "token_separators": {
      "type": "array",
      "description": "Characters to use as token separators in addition to whitespace.",
      "items": {
        "type": "string"
      }
    },
    "symbols_to_index": {
      "type": "array",
      "description": "Characters that should be indexed as part of tokens.",
      "items": {
        "type": "string"
      }
    },
    "enable_nested_fields": {
      "type": "boolean",
      "description": "Whether to enable indexing of nested object fields."
    },
    "synonym_sets": {
      "type": "array",
      "description": "List of synonym set names to attach to this collection.",
      "items": {
        "type": "string"
      }
    },
    "voice_query_model": {
      "$ref": "#/components/schemas/VoiceQueryModelConfig"
    },
    "metadata": {
      "type": "object",
      "description": "Arbitrary metadata to store with the collection."
    }
  }
}