{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/pdm.json",
  "$comment": "Configuration file for PDM. A Python package manager.\nReference: https://pdm-project.org/latest/reference/configuration/#available-configurations",
  "definitions": {
    "pypi-def": {
      "type": "object",
      "additionalProperties": false,
      "required": ["url"],
      "properties": {
        "url": {
          "type": "string",
          "description": "The URL of custom package source"
        },
        "username": {
          "type": "string",
          "description": "The username to access custom source"
        },
        "password": {
          "type": "string",
          "description": "The password to access custom source"
        },
        "type": {
          "type": "string",
          "description": "index or find_links",
          "enum": ["index", "find_links"],
          "default": "index"
        },
        "verify_ssl": {
          "type": "boolean",
          "description": "Verify SSL certificate when query custom source",
          "default": true
        }
      }
    },

    "repository-def": {
      "type": "object",
      "additionalProperties": false,

      "properties": {
        "url": {
          "type": "string",
          "description": "The URL of custom package source",
          "default": "https://pypi.org/simple"
        },
        "username": {
          "type": "string",
          "description": "The username to access custom repository"
        },
        "password": {
          "type": "string",
          "description": "The password to access custom repository"
        },
        "ca_certs": {
          "type": "string",
          "description": "Path to a PEM-encoded CA cert bundle (used for server cert verification)"
        },
        "verify_ssl": {
          "type": "boolean",
          "description": "Verify SSL certificate when uploading to repository",
          "default": true
        }
      }
    }
  },
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "build_isolation": {
      "type": "boolean",
      "description": "Isolate the build environment from the project environment\nEnv var: PDM_BUILD_ISOLATION",
      "default": true
    },
    "use_uv": {
      "type": "boolean",
      "description": "Use uv for faster resolution and installation\nEnv var: PDM_USE_UV",
      "default": false
    },
    "install": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "cache": {
          "type": "boolean",
          "description": "Enable caching of wheel installations",
          "default": true
        },
        "cache_method": {
          "type": "string",
          "description": "Specify how to create links to the caches",
          "enum": ["symlink", "symlink_individual", "hardlink", "pth"],
          "default": "symlink",
          "x-taplo": {
            "links": {
              "key": "https://pdm-project.org/latest/usage/config/#central-installation-caches"
            }
          }
        },
        "parallel": {
          "type": "boolean",
          "description": "Whether to perform installation and uninstallation in parallel\nEnv var: PDM_PARALLEL_INSTALL",
          "default": true
        }
      }
    },
    "python": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "use_pyenv": {
          "type": "boolean",
          "description": "Use the pyenv interpreter",
          "default": true
        },
        "use_venv": {
          "type": "boolean",
          "description": "Use virtual environments when available\nEnv var: PDM_USE_VENV",
          "default": true
        },

        "providers": {
          "type": "array",
          "description": "List of python provider names for findpython"
        }
      }
    },
    "pypi": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "The URL of PyPI mirror\nEnv var: PDM_PYPI_URL",
          "default": "https://pypi.org/simple"
        },
        "username": {
          "type": "string",
          "description": "The username to access PyPI\nEnv var: PDM_PYPI_USERNAME"
        },
        "password": {
          "type": "string",
          "description": "The password to access PyPI\nEnv var: PDM_PYPI_PASSWORD"
        },
        "ignore_stored_index": {
          "type": "boolean",
          "description": "Ignore the configured indexes\nEnv var: PDM_IGNORE_STORED_INDEX",
          "default": false
        },
        "verify_ssl": {
          "type": "boolean",
          "description": "Verify SSL certificate when query PyPI",
          "default": "true"
        },
        "json_api": {
          "type": "boolean",
          "description": "Consult PyPI's JSON API for package metadata\nEnv var: PDM_PYPI_JSON_API",
          "default": false
        }
      },
      "additionalProperties": {
        "$ref": "#/definitions/pypi-def"
      }
    },
    "strategy": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "save": {
          "type": "string",
          "description": "Specify how to save versions when a package is added",
          "enum": ["exact", "wildcard", "minimum", "compatible"],
          "default": "minimum"
        },
        "update": {
          "type": "string",
          "description": "The default strategy for updating packages",
          "enum": ["eager", "reuse", "all", "reuse-installed"],
          "default": "reuse",
          "x-taplo": {
            "links": {
              "key": "https://pdm-project.org/latest/usage/dependency/#about-update-strategy"
            }
          }
        },
        "resolve_max_rounds": {
          "type": "integer",
          "description": "Specify the max rounds of resolution process\nEnv var: PDM_RESOLVE_MAX_ROUNDS",
          "default": 10000
        },
        "inherit_metadata": {
          "type": "boolean",
          "description": "Inherit the groups and markers from parents for each package",
          "default": true
        }
      }
    },
    "venv": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "backend": {
          "type": "string",
          "description": "Default backend to create virtualenv\nEnv var: PDM_VENV_BACKEND",
          "default": "virtualenv"
        },
        "prompt": {
          "type": "string",
          "description": "Formatted string to be displayed in the prompt when virtualenv is active\nEnv var: PDM_VENV_PROMPT",
          "default": "{project_name}-{python_version}"
        },
        "in_project": {
          "type": "boolean",
          "description": "Create virtualenv in .venv under project root\nEnv var: PDM_VENV_IN_PROJECT",
          "default": true
        },
        "with_pip": {
          "type": "boolean",
          "description": "Install pip when creating a new venv\n Env var: PDM_VENV_WITH_PIP",
          "default": false
        }
      }
    },
    "repository": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/definitions/repository-def"
      }
    }
  },
  "title": "JSON schema for PDM Python package manager configuration.\nhttps://pdm-project.org/latest/reference/configuration/",
  "x-taplo-info": {
    "authors": ["jvllmr (https://github.com/jvllmr)"],
    "pattern": ["^(.*(/|\\\\)pdm\\.toml|pdm\\.toml)$"]
  }
}
