{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/pyproject/_shared/latest--partial-poetry.json",
  "x-lintel": {
    "source": "https://json.schemastore.org/partial-poetry.json",
    "sourceSha256": "93210a5fcedde5eab21c784b38ed663c649eb474908d94da39ba27a0110e79c4"
  },
  "type": "object",
  "properties": {
    "package-mode": {
      "type": "boolean",
      "description": "Whether Poetry operates in package mode or not.",
      "default": true
    },
    "name": {
      "$ref": "#/$defs/poetry-name"
    },
    "version": {
      "$ref": "#/$defs/poetry-version"
    },
    "description": {
      "$ref": "#/$defs/poetry-description"
    },
    "keywords": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "A tag/keyword that this package relates to."
      }
    },
    "homepage": {
      "type": "string",
      "description": "Homepage URL for the project.",
      "format": "uri"
    },
    "repository": {
      "type": "string",
      "description": "Repository URL for the project.",
      "format": "uri"
    },
    "documentation": {
      "type": "string",
      "description": "Documentation URL for the project.",
      "format": "uri"
    },
    "license": {
      "type": "string",
      "description": "License name."
    },
    "authors": {
      "$ref": "#/$defs/poetry-authors"
    },
    "maintainers": {
      "$ref": "#/$defs/poetry-maintainers"
    },
    "readme": {
      "anyOf": [
        {
          "type": "string",
          "description": "The path to the README file."
        },
        {
          "type": "array",
          "description": "A list of paths to the readme files.",
          "items": {
            "type": "string"
          }
        }
      ]
    },
    "classifiers": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of trove classifiers."
    },
    "packages": {
      "type": "array",
      "description": "A list of packages to include in the final distribution.",
      "items": {
        "type": "object",
        "description": "Information about where the package resides.",
        "properties": {
          "include": {
            "$ref": "#/$defs/poetry-include-path"
          },
          "from": {
            "type": "string",
            "description": "Where the source directory of the package resides."
          },
          "format": {
            "$ref": "#/$defs/poetry-package-formats"
          },
          "to": {
            "type": "string",
            "description": "Where the package should be installed in the final distribution."
          }
        },
        "required": [
          "include"
        ],
        "additionalProperties": false
      }
    },
    "include": {
      "type": "array",
      "description": "A list of files and folders to include.",
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/poetry-include-path"
          },
          {
            "type": "object",
            "properties": {
              "path": {
                "$ref": "#/$defs/poetry-include-path"
              },
              "format": {
                "$ref": "#/$defs/poetry-package-formats"
              }
            },
            "required": [
              "path"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "exclude": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of files and folders to exclude."
    },
    "dependencies": {
      "type": "object",
      "description": "This is a hash of package name (keys) and version constraints (values) that are required to run this package.",
      "properties": {
        "python": {
          "$ref": "#/$defs/poetry-dependency",
          "description": "The Python versions the package is compatible with."
        }
      },
      "x-tombi-table-keys-order": "ascending",
      "additionalProperties": {
        "$ref": "#/$defs/poetry-dependency-any"
      }
    },
    "dev-dependencies": {
      "type": "object",
      "description": "This is a hash of package name (keys) and version constraints (values) that this package requires for developing it (testing tools and such).",
      "additionalProperties": false,
      "x-tombi-table-keys-order": "ascending",
      "patternProperties": {
        "^[a-zA-Z-_.0-9]+$": {
          "$ref": "#/$defs/poetry-dependency-any"
        }
      }
    },
    "extras": {
      "type": "object",
      "additionalProperties": false,
      "x-tombi-table-keys-order": "ascending",
      "patternProperties": {
        "^[a-zA-Z-_.0-9]+$": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "group": {
      "type": "object",
      "description": "This represents groups of dependencies",
      "additionalProperties": false,
      "x-tombi-table-keys-order": "ascending",
      "patternProperties": {
        "^[a-zA-Z-_.0-9]+$": {
          "type": "object",
          "description": "This represents a single dependency group",
          "required": [
            "dependencies"
          ],
          "properties": {
            "optional": {
              "type": "boolean",
              "description": "Whether the dependency group is optional or not"
            },
            "dependencies": {
              "type": "object",
              "description": "The dependencies of this dependency group",
              "additionalProperties": false,
              "x-tombi-table-keys-order": "ascending",
              "patternProperties": {
                "^[a-zA-Z-_.0-9]+$": {
                  "$ref": "#/$defs/poetry-dependency-any"
                }
              }
            }
          },
          "additionalProperties": false
        }
      }
    },
    "build": {
      "$ref": "#/$defs/poetry-build-section"
    },
    "scripts": {
      "type": "object",
      "description": "A hash of scripts to be installed.",
      "additionalProperties": false,
      "x-tombi-table-keys-order": "ascending",
      "patternProperties": {
        "^[a-zA-Z-_.0-9]+$": {
          "anyOf": [
            {
              "$ref": "#/$defs/poetry-script-legacy"
            },
            {
              "$ref": "#/$defs/poetry-script-table"
            }
          ]
        }
      }
    },
    "plugins": {
      "type": "object",
      "description": "A hash of hashes representing plugins",
      "additionalProperties": false,
      "x-tombi-table-keys-order": "ascending",
      "patternProperties": {
        "^dotenv$": {
          "type": "object",
          "description": "Configuration for the poetry-plugin-dotenv",
          "properties": {
            "ignore": {
              "type": "string",
              "description": "Flag that prevents the plugin from loading the dotenv file."
            },
            "location": {
              "type": "string",
              "description": "Path to the dotenv file. It can be both absolute or relative."
            }
          },
          "additionalProperties": false
        },
        "^[a-zA-Z-_.0-9]+$": {
          "type": "object",
          "additionalProperties": false,
          "patternProperties": {
            "^[a-zA-Z-_.0-9]+$": {
              "type": "string"
            }
          }
        }
      }
    },
    "urls": {
      "type": "object",
      "additionalProperties": false,
      "x-tombi-table-keys-order": "ascending",
      "patternProperties": {
        "^.+$": {
          "type": "string",
          "description": "The full url of the custom url."
        }
      }
    },
    "source": {
      "$comment": "The unique 'pypi' source constraint is not implemented yet.",
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "name": {
                "const": "pypi",
                "description": "The name of the source."
              },
              "priority": {
                "$ref": "#/$defs/poetry-priority",
                "description": "The priority of the source."
              }
            },
            "required": [
              "name"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "name": {
                "allOf": [
                  {
                    "type": "string"
                  },
                  {
                    "not": {
                      "const": "pypi"
                    }
                  }
                ],
                "description": "The name of the source."
              },
              "url": {
                "type": "string",
                "format": "uri",
                "description": "The url of the source."
              },
              "priority": {
                "$ref": "#/$defs/poetry-priority",
                "description": "The priority of the source."
              }
            },
            "required": [
              "name",
              "url"
            ],
            "additionalProperties": false
          }
        ]
      }
    }
  },
  "$defs": {
    "poetry-name": {
      "type": "string",
      "description": "Package name."
    },
    "poetry-version": {
      "type": "string",
      "description": "Version of the package. It should follow semantic versioning, but it is not enforced."
    },
    "poetry-description": {
      "type": "string",
      "description": "Short package description.",
      "pattern": "^[^\n]*$"
    },
    "poetry-author-pattern": {
      "description": "Pattern that matches `Name <email>` like 'King Arthur' or 'Miss Islington &lt;miss-islington@python.org&gt;'.",
      "type": "string",
      "pattern": "^(?:[- .,\\w0-9'’\"():&]+)(?: <(?:.+?)>)?"
    },
    "poetry-authors": {
      "type": "array",
      "description": "List of authors that contributed to the package. This is typically the main maintainers, not the full list.",
      "items": {
        "$ref": "#/$defs/poetry-author-pattern"
      }
    },
    "poetry-maintainers": {
      "type": "array",
      "description": "List of maintainers, other than the original author(s), that upkeep the package.",
      "items": {
        "$ref": "#/$defs/poetry-author-pattern"
      }
    },
    "poetry-include-path": {
      "type": "string",
      "description": "Path to file or directory to include."
    },
    "poetry-package-format": {
      "type": "string",
      "enum": [
        "sdist",
        "wheel"
      ],
      "description": "A Python packaging format."
    },
    "poetry-package-formats": {
      "anyOf": [
        {
          "$ref": "#/$defs/poetry-package-format"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/poetry-package-format"
          }
        }
      ],
      "description": "The format(s) for which the package must be included."
    },
    "poetry-dependency-any": {
      "anyOf": [
        {
          "$ref": "#/$defs/poetry-dependency"
        },
        {
          "$ref": "#/$defs/poetry-long-dependency"
        },
        {
          "$ref": "#/$defs/poetry-git-dependency"
        },
        {
          "$ref": "#/$defs/poetry-file-dependency"
        },
        {
          "$ref": "#/$defs/poetry-path-dependency"
        },
        {
          "$ref": "#/$defs/poetry-url-dependency"
        },
        {
          "$ref": "#/$defs/poetry-multiple-constraints-dependency"
        }
      ]
    },
    "poetry-pep440-version": {
      "type": "string",
      "description": "A version constraint. Validates against the PEP 440's version pattern."
    },
    "poetry-dependency": {
      "$ref": "#/$defs/poetry-pep440-version"
    },
    "poetry-long-dependency": {
      "type": "object",
      "required": [
        "version"
      ],
      "properties": {
        "version": {
          "$ref": "#/$defs/poetry-pep440-version"
        },
        "python": {
          "type": "string",
          "description": "The python versions for which the dependency should be installed."
        },
        "platform": {
          "type": "string",
          "description": "The platform(s) for which the dependency should be installed."
        },
        "markers": {
          "type": "string",
          "description": "The PEP 508 compliant environment markers for which the dependency should be installed."
        },
        "allow-prereleases": {
          "type": "boolean",
          "description": "Whether the dependency allows prereleases or not."
        },
        "allows-prereleases": {
          "type": "boolean",
          "description": "Whether the dependency allows prereleases or not."
        },
        "optional": {
          "type": "boolean",
          "description": "Whether the dependency is optional or not."
        },
        "extras": {
          "type": "array",
          "description": "The required extras for this dependency.",
          "items": {
            "type": "string"
          }
        },
        "source": {
          "type": "string",
          "description": "The exclusive source used to search for this dependency."
        }
      },
      "additionalProperties": false
    },
    "poetry-git-dependency": {
      "type": "object",
      "required": [
        "git"
      ],
      "properties": {
        "git": {
          "description": "The url of the git repository.",
          "anyOf": [
            {
              "type": "string",
              "format": "uri"
            },
            {
              "type": "string",
              "pattern": "^([A-Za-z0-9\\-]+@|https://|http://)[A-Za-z][A-Za-z0-9+.-]*(:|/)[A-Za-z0-9\\-\\.]+(/[A-Za-z0-9\\-_\\.]+)+\\.git$"
            }
          ]
        },
        "branch": {
          "type": "string",
          "description": "The branch to checkout."
        },
        "tag": {
          "type": "string",
          "description": "The tag to checkout."
        },
        "rev": {
          "type": "string",
          "description": "The revision to checkout."
        },
        "subdirectory": {
          "type": "string",
          "description": "The relative path to the directory where the package is located."
        },
        "python": {
          "type": "string",
          "description": "The python versions for which the dependency should be installed."
        },
        "platform": {
          "type": "string",
          "description": "The platform(s) for which the dependency should be installed."
        },
        "markers": {
          "type": "string",
          "description": "The PEP 508 compliant environment markers for which the dependency should be installed."
        },
        "allow-prereleases": {
          "type": "boolean",
          "description": "Whether the dependency allows prereleases or not."
        },
        "allows-prereleases": {
          "type": "boolean",
          "description": "Whether the dependency allows prereleases or not."
        },
        "optional": {
          "type": "boolean",
          "description": "Whether the dependency is optional or not."
        },
        "extras": {
          "type": "array",
          "description": "The required extras for this dependency.",
          "items": {
            "type": "string"
          }
        },
        "develop": {
          "type": "boolean",
          "description": "Whether to install the dependency in development mode."
        }
      },
      "additionalProperties": false
    },
    "poetry-file-dependency": {
      "type": "object",
      "required": [
        "file"
      ],
      "properties": {
        "file": {
          "type": "string",
          "description": "The path to the file."
        },
        "python": {
          "type": "string",
          "description": "The python versions for which the dependency should be installed."
        },
        "platform": {
          "type": "string",
          "description": "The platform(s) for which the dependency should be installed."
        },
        "markers": {
          "type": "string",
          "description": "The PEP 508 compliant environment markers for which the dependency should be installed."
        },
        "optional": {
          "type": "boolean",
          "description": "Whether the dependency is optional or not."
        },
        "extras": {
          "type": "array",
          "description": "The required extras for this dependency.",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "poetry-path-dependency": {
      "type": "object",
      "required": [
        "path"
      ],
      "properties": {
        "path": {
          "type": "string",
          "description": "The path to the dependency."
        },
        "python": {
          "type": "string",
          "description": "The python versions for which the dependency should be installed."
        },
        "platform": {
          "type": "string",
          "description": "The platform(s) for which the dependency should be installed."
        },
        "markers": {
          "type": "string",
          "description": "The PEP 508 compliant environment markers for which the dependency should be installed."
        },
        "optional": {
          "type": "boolean",
          "description": "Whether the dependency is optional or not."
        },
        "extras": {
          "type": "array",
          "description": "The required extras for this dependency.",
          "items": {
            "type": "string"
          }
        },
        "develop": {
          "type": "boolean",
          "description": "Whether to install the dependency in development mode."
        }
      },
      "additionalProperties": false
    },
    "poetry-url-dependency": {
      "type": "object",
      "required": [
        "url"
      ],
      "properties": {
        "url": {
          "type": "string",
          "description": "The url to the file."
        },
        "python": {
          "type": "string",
          "description": "The python versions for which the dependency should be installed."
        },
        "platform": {
          "type": "string",
          "description": "The platform(s) for which the dependency should be installed."
        },
        "markers": {
          "type": "string",
          "description": "The PEP 508 compliant environment markers for which the dependency should be installed."
        },
        "optional": {
          "type": "boolean",
          "description": "Whether the dependency is optional or not."
        },
        "extras": {
          "type": "array",
          "description": "The required extras for this dependency.",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "poetry-multiple-constraints-dependency": {
      "type": "array",
      "minItems": 1,
      "items": {
        "anyOf": [
          {
            "$ref": "#/$defs/poetry-dependency"
          },
          {
            "$ref": "#/$defs/poetry-long-dependency"
          },
          {
            "$ref": "#/$defs/poetry-git-dependency"
          },
          {
            "$ref": "#/$defs/poetry-file-dependency"
          },
          {
            "$ref": "#/$defs/poetry-path-dependency"
          },
          {
            "$ref": "#/$defs/poetry-url-dependency"
          }
        ]
      }
    },
    "poetry-script-table": {
      "anyOf": [
        {
          "$ref": "#/$defs/poetry-extra-script-legacy"
        },
        {
          "$ref": "#/$defs/poetry-extra-scripts"
        }
      ]
    },
    "poetry-script-legacy": {
      "type": "string",
      "description": "A simple script pointing to a callable object."
    },
    "poetry-extra-scripts": {
      "type": "object",
      "description": "Either a console entry point or a script file that'll be included in the distribution package.",
      "required": [
        "reference",
        "type"
      ],
      "properties": {
        "reference": {
          "type": "string",
          "description": "If type is file this is the relative path of the script file, if console it is the module name."
        },
        "type": {
          "description": "Value can be either file or console.",
          "type": "string",
          "enum": [
            "file",
            "console"
          ]
        },
        "extras": {
          "type": "array",
          "description": "The required extras for this script. Only applicable if type is console.",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "poetry-extra-script-legacy": {
      "type": "object",
      "description": "A script that should be installed only if extras are activated.",
      "properties": {
        "callable": {
          "$ref": "#/$defs/poetry-script-legacy",
          "description": "The entry point of the script. Deprecated in favour of reference."
        },
        "extras": {
          "type": "array",
          "description": "The required extras for this script.",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "poetry-build-script": {
      "type": "string",
      "description": "The python script file used to build extensions."
    },
    "poetry-build-config": {
      "type": "object",
      "description": "Build specific configurations.",
      "properties": {
        "generate-setup-file": {
          "type": "boolean",
          "description": "Generate and include a setup.py file in sdist.",
          "default": true
        },
        "script": {
          "$ref": "#/$defs/poetry-build-script"
        }
      },
      "additionalProperties": false
    },
    "poetry-build-section": {
      "anyOf": [
        {
          "$ref": "#/$defs/poetry-build-script"
        },
        {
          "$ref": "#/$defs/poetry-build-config"
        }
      ]
    },
    "poetry-priority": {
      "enum": [
        "default",
        "primary",
        "secondary",
        "supplemental",
        "explicit"
      ]
    }
  },
  "additionalProperties": true
}
