{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/pylock/latest.json",
  "x-lintel": {
    "source": "https://www.schemastore.org/pylock.json",
    "sourceSha256": "08aa2db5185ca8acfad2131a015e5defd7cf8bbead7d8b0b0620d63ac13d67f8",
    "fileMatch": [
      "pylock.toml",
      "pylock.*.toml"
    ],
    "parsers": [
      "toml"
    ]
  },
  "type": "object",
  "oneOf": [
    {
      "$ref": "#/$defs/1.0"
    }
  ],
  "$defs": {
    "tool": {
      "type": "object",
      "markdownDescription": "Similar usage as that of the `[tool]` table from the [pyproject.toml specification](https://packaging.python.org/en/latest/specifications/pyproject-toml/#pyproject-toml-spec), but at the package version level instead of at the lock file level (which is also available via `[tool]`).",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "url": {
      "type": "string",
      "markdownDescription": "The URL to the source tree."
    },
    "path": {
      "type": "string",
      "markdownDescription": "The path to the local directory of the source tree."
    },
    "upload-time": {
      "markdownDescription": "The time the file was uploaded (UTC). Must be specified as a datetime literal."
    },
    "size": {
      "type": "integer",
      "markdownDescription": "The size of the archive file."
    },
    "hashes": {
      "type": "object",
      "description": "Known hash values of the file where the key is the hash algorithm and the value is the hash value.",
      "additionalProperties": {
        "type": "string"
      }
    },
    "subdirectory": {
      "type": "string",
      "markdownDescription": "The subdirectory within the [source tree](https://packaging.python.org/en/latest/specifications/source-distribution-format/#source-distribution-format-source-tree) where the project root of the project is (e.g. the location of the `pyproject.toml` file)."
    },
    "vcs": {
      "type": "object",
      "markdownDescription": "Record the version control system details for the [source tree](https://packaging.python.org/en/latest/specifications/source-distribution-format/#source-distribution-format-source-tree) it contains.",
      "properties": {
        "type": {
          "type": "string",
          "markdownDescription": "The type of version control system used."
        },
        "url": {
          "$ref": "#/$defs/url"
        },
        "path": {
          "$ref": "#/$defs/path"
        },
        "requested-revision": {
          "type": "string",
          "markdownDescription": "The branch/tag/ref/commit/revision/etc. that the user requested."
        },
        "commit-id": {
          "type": "string",
          "markdownDescription": "The exact commit/revision number that is to be installed."
        },
        "subdirectory": {
          "$ref": "#/$defs/subdirectory"
        }
      },
      "additionalProperties": false
    },
    "directory": {
      "type": "object",
      "markdownDescription": "Record the local directory details for the [source tree](https://packaging.python.org/en/latest/specifications/source-distribution-format/#source-distribution-format-source-tree) it contains.",
      "properties": {
        "path": {
          "type": "string",
          "markdownDescription": "The local directory where the source tree is."
        },
        "editable": {
          "type": "boolean",
          "default": false,
          "markdownDescription": "A flag representing whether the source tree was an editable install at lock time."
        },
        "subdirectory": {
          "$ref": "#/$defs/subdirectory"
        }
      },
      "additionalProperties": false
    },
    "archive": {
      "type": "object",
      "properties": {
        "url": {
          "$ref": "#/$defs/url"
        },
        "path": {
          "$ref": "#/$defs/path"
        },
        "size": {
          "$ref": "#/$defs/size"
        },
        "upload-time": {
          "$ref": "#/$defs/upload-time"
        },
        "hashes": {
          "$ref": "#/$defs/hashes"
        },
        "subdirectory": {
          "$ref": "#/$defs/subdirectory"
        }
      },
      "markdownDescription": "A direct reference to an archive file to install from (this can include wheels and sdists, as well as other archive formats containing a source tree).",
      "additionalProperties": false
    },
    "sdist": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "markdownDescription": "The file name of the [source distribution file name](https://packaging.python.org/en/latest/specifications/source-distribution-format/#source-distribution-format-sdist) file."
        },
        "upload-time": {
          "$ref": "#/$defs/upload-time"
        },
        "url": {
          "$ref": "#/$defs/url"
        },
        "path": {
          "$ref": "#/$defs/path"
        },
        "size": {
          "$ref": "#/$defs/size"
        },
        "hashes": {
          "$ref": "#/$defs/hashes"
        }
      },
      "markdownDescription": "Details of a [source distribution file name](https://packaging.python.org/en/latest/specifications/source-distribution-format/#source-distribution-format-sdist) for the package.",
      "additionalProperties": false
    },
    "wheels": {
      "type": "array",
      "markdownDescription": "For recording the wheel files as specified by [Binary distribution format](https://packaging.python.org/en/latest/specifications/binary-distribution-format/#binary-distribution-format) for the package.",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "markdownDescription": "The file name of the [Binary distribution format](https://packaging.python.org/en/latest/specifications/binary-distribution-format/#binary-distribution-format) file."
          },
          "upload-time": {
            "$ref": "#/$defs/upload-time"
          },
          "url": {
            "$ref": "#/$defs/url"
          },
          "path": {
            "$ref": "#/$defs/path"
          },
          "size": {
            "$ref": "#/$defs/size"
          },
          "hashes": {
            "$ref": "#/$defs/hashes"
          }
        },
        "additionalProperties": false
      }
    },
    "1.0": {
      "properties": {
        "lock-version": {
          "type": "string",
          "enum": [
            "1.0"
          ],
          "description": "Record the file format version that the file adheres to."
        },
        "environments": {
          "type": "array",
          "markdownDescription": "A list of [environment markers](https://packaging.python.org/en/latest/specifications/dependency-specifiers/#dependency-specifiers-environment-markers) for which the lock file is considered compatible with.",
          "items": {
            "type": "string",
            "description": "Environment marker"
          }
        },
        "requires-python": {
          "type": "string",
          "markdownDescription": "Specifies the [Requires-Python](https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata-requires-python) for the minimum Python version compatible for any environment supported by the lock file (i.e. the minimum viable Python version for the lock file)."
        },
        "extras": {
          "type": "array",
          "markdownDescription": "The list of [extras](https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata-provides-extra) supported by this lock file.",
          "default": [],
          "items": {
            "type": "string",
            "description": "Extra name"
          }
        },
        "dependency-groups": {
          "type": "array",
          "markdownDescription": "The list of [dependency groups](https://packaging.python.org/en/latest/specifications/dependency-groups/#dependency-groups) publicly supported by this lock file (i.e. dependency groups users are expected to be able to specify via a tool’s UI).",
          "default": [],
          "items": {
            "type": "string",
            "description": "Dependency group name"
          }
        },
        "default-groups": {
          "type": "array",
          "markdownDescription": "The name of synthetic dependency groups to represent what should be installed by default (e.g. what `project.dependencies` implicitly represents).",
          "default": [],
          "items": {
            "type": "string",
            "description": "Dependency group name"
          }
        },
        "created-by": {
          "type": "string",
          "markdownDescription": "Records the name of the tool used to create the lock file."
        },
        "packages": {
          "type": "array",
          "markdownDescription": "An array containing all packages that may be installed.",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "markdownDescription": "The name of the package, [normalized](https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization)."
              },
              "version": {
                "type": "string",
                "description": "The version of the package."
              },
              "marker": {
                "type": "string",
                "markdownDescription": "The [environment marker](https://packaging.python.org/en/latest/specifications/dependency-specifiers/#dependency-specifiers-environment-markers) which specify when the package should be installed."
              },
              "requires-python": {
                "type": "string",
                "markdownDescription": "Holds the [version specifiers](https://packaging.python.org/en/latest/specifications/version-specifiers/#version-specifiers) for Python version compatibility for the package."
              },
              "dependencies": {
                "type": "array",
                "markdownDescription": "Records the other entries in `[[packages]]` which are direct dependencies of this package.",
                "items": {
                  "type": "object",
                  "markdownDescription": "A table which contains the minimum information required to tell which other package entry it corresponds to where doing a key-by-key comparison would find the appropriate package with no ambiguity (e.g. if there are two entries for the `spam` package, then you can include the version number like `{name = \"spam\", version = \"1.0.0\"}`, or by source like `{name = \"spam\", vcs = { url = \"...\"}`).",
                  "additionalProperties": true
                }
              },
              "vcs": {
                "$ref": "#/$defs/vcs"
              },
              "directory": {
                "$ref": "#/$defs/directory"
              },
              "archive": {
                "$ref": "#/$defs/archive"
              },
              "index": {
                "type": "string",
                "markdownDescription": "The base URL for the package index from [simple repository API](https://packaging.python.org/en/latest/specifications/simple-repository-api/#simple-repository-api) where the sdist and/or wheels were found (e.g. `https://pypi.org/simple/`)."
              },
              "sdist": {
                "$ref": "#/$defs/sdist"
              },
              "wheels": {
                "$ref": "#/$defs/wheels"
              },
              "attestation-identities": {
                "type": "array",
                "markdownDescription": "A recording of the attestations for any file recorded for this package.",
                "items": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "markdownDescription": "The unique identity of the Trusted Publisher."
                    }
                  },
                  "required": [
                    "kind"
                  ],
                  "additionalProperties": false
                }
              },
              "tool": {
                "$ref": "#/$defs/tool"
              }
            },
            "required": [
              "name"
            ],
            "allOf": [
              {
                "if": {
                  "required": [
                    "vcs"
                  ]
                },
                "then": {
                  "not": {
                    "required": [
                      "directory",
                      "archive",
                      "sdist",
                      "wheels"
                    ]
                  }
                }
              },
              {
                "if": {
                  "required": [
                    "directory"
                  ]
                },
                "then": {
                  "not": {
                    "required": [
                      "vcs",
                      "archive",
                      "sdist",
                      "wheels"
                    ]
                  }
                }
              },
              {
                "if": {
                  "required": [
                    "sdist"
                  ]
                },
                "then": {
                  "not": {
                    "required": [
                      "vcs",
                      "directory",
                      "archive"
                    ]
                  }
                }
              },
              {
                "if": {
                  "required": [
                    "wheels"
                  ]
                },
                "then": {
                  "not": {
                    "required": [
                      "vcs",
                      "directory",
                      "archive"
                    ]
                  }
                }
              }
            ],
            "additionalProperties": false
          }
        },
        "tool": {
          "$ref": "#/$defs/tool"
        }
      },
      "required": [
        "lock-version",
        "created-by",
        "packages"
      ],
      "additionalProperties": false,
      "type": "object"
    }
  }
}
