{
  "$id": "https://slopvac.github.io/slopvac/schemas/v3/category.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "A group of rules, and the unit users enable, disable and score by. One category per file. Rule ids are unique within the category. Semantics are specified in docs/contract/rules.md.",
  "patternProperties": {
    "^x-": true
  },
  "properties": {
    "description": {
      "description": "What the category covers.",
      "minLength": 1,
      "type": "string"
    },
    "id": {
      "description": "Category id. The qualified rule id is `<plugin>:<category>.<rule>`.",
      "pattern": "^[a-z][a-z0-9-]*(?![\\s\\S])",
      "type": "string"
    },
    "max_per_100_words": {
      "additionalProperties": {
        "description": "Findings per 100 words.",
        "minimum": 0,
        "type": "number"
      },
      "description": "Density budget per profile, keyed by profile name. Absent means no budget.",
      "propertyNames": {
        "pattern": "^[a-z][a-z0-9-]*(?![\\s\\S])"
      },
      "type": "object"
    },
    "recommended_for": {
      "description": "Genres this category suits.",
      "items": {
        "$ref": "rule.schema.json#/$defs/Genre"
      },
      "type": "array",
      "uniqueItems": true
    },
    "rules": {
      "description": "The rules.",
      "items": {
        "$ref": "rule.schema.json#/$defs/Rule"
      },
      "type": "array"
    },
    "schema_version": {
      "$ref": "common.schema.json#/$defs/SchemaVersion",
      "description": "Always 3."
    },
    "title": {
      "description": "Display title.",
      "minLength": 1,
      "type": "string"
    },
    "weight": {
      "default": 1.0,
      "description": "Contribution to the overall score before any config override.",
      "minimum": 0,
      "type": "number"
    }
  },
  "required": [
    "schema_version",
    "id",
    "title",
    "description",
    "rules"
  ],
  "title": "slopvac v3 category",
  "type": "object"
}
