{
	"$schema": "http://json-schema.org/draft-07/schema",
	"type": "object",
	"description": "The root object of Regolith's config.json file",
	"properties": {
		"name": {
			"type": "string",
			"description": "The name of the project."
		},
		"author": {
			"type": "string",
			"description": "The author of the project."
		},
		"packs": {
			"type": "object",
			"description": "The paths to the source RP and BP files.",
			"properties": {
				"behaviorPack": {
					"type": "string",
					"description": "The path to the source behavior pack of the Regolith project."
				},
				"resourcePack": {
					"type": "string",
					"description": "The path to the source resource pack of the Regolith project."
				}
			}
		},
		"regolith": {
			"type": "object",
			"description": "The Regolith configuration object.",
			"properties": {
				"profiles": {
					"type": "object",
					"additionalProperties": {
						"type": "object",
						"properties": {
							"export": {
								"type": "object",
								"properties": {
									"readOnly": {
										"type": "boolean",
										"description": "Whether the RP and BP files generated by Regolith will be marked as read-only."
									}
								},
								"anyOf": [
									{
										"properties": {
											"target": {
												"description": "The type of the export target.",
												"const": "development"
											},
											"build": {
												"type": "string",
												"description": "The build of the Minecraft to export to.",
												"enum": ["standard", "education", "preview"]
											},
											"rpName": {
												"description": "The name of the directory for the RP files export defined as an expression evaluated with go-simple-eval (https://github.com/stirante/go-simple-eval/ ).",
												"type": "string"
											},
											"bpName": {
												"description": "The name of the directory for the BP files export defined as an expression evaluated with go-simple-eval (https://github.com/stirante/go-simple-eval/ ).",
												"type": "string"
											}
										}
									},
									{
										"properties": {
											"target": {
												"description": "The type of the export target.",
												"const": "world"
											},
											"build": {
												"type": "string",
												"description": "The build of the Minecraft to export to.",
												"enum": ["standard", "education", "preview"]
											},
											"worldName": {
												"description": "The name of the world for exporting packs. Use only for the 'world' export target.",
												"type": "string"
											},
											"worldPath": {
												"description": "The path to the world for exporting packs. Use only for the 'world' export target.",
												"type": "string"
											}
										}
									},
									{
										"properties": {
											"target": {
												"description": "The type of the export target.",
												"const": "local"
											},
											"rpPath": {
												"description": "The export resource pack path for the 'exact' export target.",
												"type": "string"
											},
											"bpPath": {
												"description": "The export behavior pack path for the 'exact' export target.",
												"type": "string"
											},
											"rpName": {
												"description": "The name of the directory for the RP files export defined as an expression evaluated with go-simple-eval (https://github.com/stirante/go-simple-eval/ ).",
												"type": "string"
											},
											"bpName": {
												"description": "The name of the directory for the BP files export defined as an expression evaluated with go-simple-eval (https://github.com/stirante/go-simple-eval/ ).",
												"type": "string"
											}
										}
									},
									{
										"properties": {
											"target": {
												"description": "The type of the export target.",
												"const": "exact"
											},
											"rpPath": {
												"description": "The export resource pack path for the 'exact' export target.",
												"type": "string"
											},
											"bpPath": {
												"description": "The export behavior pack path for the 'exact' export target.",
												"type": "string"
											}
										}
									},
									{
										"properties": {
											"target": {
												"description": "The type of the export target.",
												"const": "none"
											}
										}
									}
								]
							},
							"filters": {
								"type": "array",
								"description": "The list of the filters used by the profile and their settigns.",
								"items": {
									"properties": {
										"disabled": {
											"type": "boolean",
											"description": "Whether the filter is disabled. The disabled filters are not applied, it's the same as if the filter was not specified in the profile."
										},
										"filter": {
											"type": "string",
											"description": "The name of the filter that matches one of the filter names from filterDefinitions."
										},
										"profile": {
											"type": "string",
											"description": "The name of another profile. Profiles can reference each other as long as the relation is not circular."
										},
										"when": {
											"type": "string",
											"description": "An expression that is evaluated by Regolith to decide whether the filter should be executed.",
											"examples": [
												"os == \"windows\"",
												"arch == \"amd64\"",
												"debug == true && version == \"0.0.18\""
											]
										},
										"settings": {
											"type": "object",
											"description": "The object with settings passed in JSON fromat to the filter as its first command line argument."
										},
										"arguments": {
											"type": "array",
											"description": "The list of the command line arguments passed to the filter. If combined with settings, the settings will be passed as the first argument and the rest of the arguments will be passet in later arguments.",
											"items": {
												"type": "string"
											}
										}
									},
									"additionalProperties": false
								}
							}
						},
						"additionalProperties": false
					}
				},
				"formatVersion": {
					"const": "1.4.0"
				},
				"filterDefinitions": {
					"type": "object",
					"description": "The list of the filters installed for the project. This is mostly populated by Regolith itself with commands like 'regolith install'.",
					"additionalProperties": {
						"type": "object",
						"anyOf": [
							{
								"type": "object",
								"properties": {
									"url": {
										"type": "string",
										"description": "The URL to the remote filter."
									},
									"version": {
										"type": "string",
										"description": "The version of the remote filter. It can be a commit ID on source repository, a tag, or a semantic version (which internally is converted to a tag using pattern: <filter-name>_<semver>."
									},
									"runWith": {
										"type": "string",
										"description": "The type of the filter.",
										"enum": [
											"java",
											"dotnet",
											"nim",
											"python",
											"shell",
											"nodejs",
											"deno",
											"exe"
										]
									},
									"command": {
										"type": "string",
										"description": "The command to run. Use only for 'shell' filters."
									},
									"script": {
										"type": "string",
										"description": "The path to the script - absolute or relative to the config.json file. Use only for the 'java', 'nim', 'python', 'nodejs' and 'deno' filters."
									},
									"exe": {
										"type": "string",
										"description": "The path to the executable - absolute or relative to the config.json file. Use only for the 'exe' filters."
									},
									"requirements": {
										"type": "string",
										"description": "The path to the folder with the requirements file (optional). For Python it's the path to the folder with \"requirements.txt\", for nim it's the path with the *.nimble file and for nodejs it's the path to the folder with \"package.json\". If not specified, Regolith uses the parent of the \"script\" property."
									}
								},
								"additionalProperties": false
							}
						]
					}
				},
				"dataPath": {
					"type": "string",
					"description": "The path to the data folder of the Regolith filters."
				}
			}
		}
	},
	"additionalProperties": true
}