{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/sponge-mixin-configuration/latest.json",
  "x-lintel": {
    "source": "https://www.schemastore.org/sponge-mixins.json",
    "sourceSha256": "ecfca1725e2e129e564805377c4c840a3676f42e421c50e10d949c817a539008",
    "fileMatch": [
      "*.mixins.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "type": "object",
  "properties": {
    "parent": {
      "type": "string",
      "description": "The name of a parent configuration that options get inherited from"
    },
    "target": {
      "type": "string",
      "description": "Target selector. Either the specifies the phase directly or use \"@env(PHASE)\" separated by '&', '\\', or ' '"
    },
    "minVersion": {
      "type": "string",
      "pattern": "^(\\d{1,5})(?:\\.(\\d{1,5})(?:\\.(\\d{1,5})(?:\\.(\\d{1,5}))?)?)?(-[a-zA-Z0-9_\\-]+)?$",
      "description": "Minimum version of the mixin subsystem required for this configuration"
    },
    "compatibilityLevel": {
      "type": "string",
      "description": "Minimum compatibility level required for mixins in this set"
    },
    "required": {
      "type": "boolean",
      "description": "Determines whether mixin failures in this configuration are considered terminal and stop the game"
    },
    "priority": {
      "type": "integer",
      "description": "The priority of this configuration. Will be inherited if smaller than 0",
      "default": -1
    },
    "mixinPriority": {
      "type": "integer",
      "description": "Default mixin priority for this configuration. Will be inherited if smaller than 0",
      "default": -1
    },
    "package": {
      "type": "string",
      "description": "The target package where the mixin classes reside"
    },
    "mixins": {
      "type": "array",
      "description": "Mixin classes to load in all environments. Class names get prepended with the specified package",
      "items": {
        "$ref": "#/$defs/mixin_class"
      }
    },
    "client": {
      "type": "array",
      "description": "Mixin classes to load ONLY on client. Class names get prepended with the specified package",
      "items": {
        "$ref": "#/$defs/mixin_class"
      }
    },
    "server": {
      "type": "array",
      "description": "Mixin classes to load ONLY on server. Class names get prepended with the specified package",
      "items": {
        "$ref": "#/$defs/mixin_class"
      }
    },
    "setSourceFile": {
      "type": "boolean",
      "description": "Sets whether targets' source files will be updated to the mixin source file"
    },
    "refmap": {
      "type": "string",
      "description": "The path to the reference map resource to use for this configuration"
    },
    "verbose": {
      "type": "boolean",
      "description": "Increases log detail level from DEBUG to INFO",
      "default": false
    },
    "plugin": {
      "type": "string",
      "description": "Name of the mixin config plugin to use for this config"
    },
    "injectors": {
      "$ref": "#/$defs/injector_options"
    },
    "overwrites": {
      "$ref": "#/$defs/overwrite_options"
    }
  },
  "required": [
    "package"
  ],
  "$defs": {
    "mixin_class": {
      "type": "string",
      "description": "The dot-separated path to the mixin class relative to the specified package. The class must be annotated with @Mixin"
    },
    "injector_options": {
      "type": "object",
      "description": "Injection options",
      "properties": {
        "defaultRequire": {
          "type": "integer",
          "minimum": 0,
          "description": "Sets the default minimum of injections that must be successfully applied per injector",
          "default": 0
        },
        "defaultGroup": {
          "type": "string",
          "description": "Sets the default injector group",
          "default": "default"
        },
        "injectionPoints": {
          "type": "array",
          "description": "Registers injection points for this configuration",
          "items": {
            "type": "string"
          }
        },
        "maxShiftBy": {
          "type": "integer",
          "minimum": 0,
          "maximum": 5,
          "default": 5,
          "description": "Sets the maximum allowed number of opcodes that can be shifted in @At annotations. This is hard capped at 5"
        }
      }
    },
    "overwrite_options": {
      "type": "object",
      "description": "Overwrite options",
      "properties": {
        "conformVisibility": {
          "type": "boolean",
          "description": "Sets whether the visibility of overwritten methods should be conformed to the target class"
        },
        "requireAnnotations": {
          "type": "boolean",
          "default": true,
          "description": "Sets whether overwriting methods must explicitly be declared through @Overwrite annotations"
        }
      }
    }
  }
}
