{
  "$id": "search_setting.json",
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "additionalProperties": false,
  "properties": {
    "filterSettings": {
      "$id": "filter_settings",
      "additionalProperties": false,
      "properties": {
        "excludesTags": {
          "description": "The tags which the cards must *not* have to be included in search results",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "includesTags": {
          "description": "The tags which the cards must have to be included in search results",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "languages": {
          "description": "The language the cards have to be written in to be included in search results",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "maximumDPI": {
          "description": "The maximum DPI that cards can have to be included in search results",
          "minimum": 0,
          "type": "number"
        },
        "maximumSize": {
          "description": "The maximum filesize that cards can have to be included in search results",
          "minimum": 0,
          "type": "number"
        },
        "minimumDPI": {
          "description": "The minimum DPI that cards must meet to be included in search results",
          "minimum": 0,
          "type": "number"
        }
      },
      "required": [
        "minimumDPI",
        "maximumDPI",
        "maximumSize",
        "languages",
        "includesTags",
        "excludesTags"
      ],
      "title": "Filter Settings",
      "type": "object"
    },
    "searchTypeSettings": {
      "$id": "search_type_settings",
      "additionalProperties": false,
      "properties": {
        "filterCardbacks": {
          "description": "Whether search settings apply to cardbacks or not",
          "type": "boolean"
        },
        "fuzzySearch": {
          "description": "Whether fuzzy search is enabled",
          "type": "boolean"
        }
      },
      "required": [
        "fuzzySearch",
        "filterCardbacks"
      ],
      "title": "Search Type Settings",
      "type": "object"
    },
    "sourceSettings": {
      "$id": "source_settings",
      "additionalProperties": false,
      "properties": {
        "sources": {
          "description": "The list of sources in the order they should be searched",
          "items": {
            "$id": "source_row",
            "additionalProperties": false,
            "items": [
              {
                "description": "The source's primary key",
                "minimum": 0,
                "type": "number"
              },
              {
                "description": "Whether the source is enabled for searching",
                "type": "boolean"
              }
            ],
            "maxItems": 2,
            "minItems": 2,
            "title": "Source Row",
            "type": "array"
          },
          "type": [
            "array",
            "null"
          ]
        }
      },
      "required": [
        "sources"
      ],
      "title": "Source Settings",
      "type": "object"
    }
  },
  "required": [
    "searchTypeSettings",
    "sourceSettings",
    "filterSettings"
  ],
  "title": "Search Settings",
  "type": "object"
}