{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/buf.lock.json",
  "$comment": "https://buf.build/docs/configuration/v2/buf-lock",
  "title": "buf.lock",
  "description": "buf.lock is a dependency lock file generated by buf via 'buf dep update'. It represents a single, reproducible build of the workspace's external dependencies and should never be hand-edited.",
  "type": "object",
  "readOnly": true,
  "required": ["version"],
  "properties": {
    "version": {
      "description": "Buf configuration version.",
      "type": "string",
      "enum": ["v2", "v1", "v1beta1"]
    },
    "deps": {
      "description": "Module pins, each uniquely representing a specific snapshot of a module, protected with a cryptographic digest.",
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name", "commit", "digest"],
        "additionalProperties": false,
        "properties": {
          "name": {
            "description": "Module name.",
            "type": "string",
            "pattern": "^[a-z0-9.-]+/[a-z0-9-]+/[a-z0-9-]+$",
            "examples": [
              "buf.build/googleapis/googleapis",
              "buf.build/grpc/grpc"
            ]
          },
          "commit": {
            "description": "Commit that uniquely identifies this snapshot of the module.",
            "type": "string",
            "pattern": "^[a-f0-9]{32}$",
            "examples": ["7a6bc1e3207144b38e9066861e1de0ff"]
          },
          "digest": {
            "description": "Digest of the module contents.",
            "type": "string",
            "pattern": "^b[0-9]+:[a-f0-9]+$",
            "examples": [
              "b5:6d05bde5ed4cd22531d7ca6467feb828d2dc45cc9de12ce3345fbddd64ddb1bf0db756558c32ca49e6bc7de4426ada8960d5590e8446854b81f5f36f0916dc48"
            ]
          }
        }
      }
    }
  }
}
