{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/snowflake-connections.json",
  "x-tombi-toml-version": "1.0.0",
  "type": "object",
  "properties": {
    "default": {
      "$ref": "#/definitions/SnowflakeConnection",
      "title": "Default Connection",
      "description": "The default connection to use"
    }
  },
  "additionalProperties": {
    "$ref": "#/definitions/SnowflakeConnection"
  },
  "minProperties": 1,
  "definitions": {
    "SnowflakeConnection": {
      "type": "object",
      "title": "Snowflake Connection Configuration",
      "description": "Configuration settings for connecting to a Snowflake database instance",
      "properties": {
        "account": {
          "type": "string",
          "title": "Account Identifier",
          "description": "The Snowflake account identifier",
          "examples": ["myaccount"]
        },
        "user": {
          "type": "string",
          "title": "Username",
          "description": "The username to authenticate with Snowflake",
          "examples": ["jondoe"]
        },
        "password": {
          "type": "string",
          "title": "Password",
          "description": "The password for authentication with Snowflake",
          "examples": ["******"]
        },
        "warehouse": {
          "type": "string",
          "title": "Warehouse",
          "description": "The name of the Snowflake warehouse to use for queries",
          "examples": ["my-wh"]
        },
        "database": {
          "type": "string",
          "title": "Database",
          "description": "The name of the Snowflake database to connect to",
          "examples": ["my_db"]
        },
        "schema": {
          "type": "string",
          "title": "Schema",
          "description": "The name of the database schema to use",
          "examples": ["my_schema"]
        },
        "role": {
          "type": "string",
          "title": "Role",
          "description": "The name of the Snowflake role to use"
        },
        "authenticator": {
          "type": "string",
          "title": "Authenticator",
          "description": "The name of the Snowflake authenticator to use",
          "enum": [
            "externalbrowser",
            "id_token",
            "no_auth",
            "oauth",
            "oauth_client_credentials",
            "oauth_authorization_code",
            "okta",
            "programmatic_access_token",
            "snowflake_jwt",
            "snowflake",
            "tokenaccessor",
            "username_password_mfa",
            "workload_identity"
          ],
          "default": "snowflake"
        },
        "private_key_file": {
          "type": "string",
          "title": "Private Key File for JWT Authentication",
          "description": "The path to the private key file for the Snowflake JWT Authentication"
        },
        "private_key_file_pwd": {
          "type": "string",
          "title": "Private Key File Password for JWT Authentication",
          "description": "The password for the private key file for the Snowflake JWT Authentication"
        },
        "private_key_path": {
          "type": "string",
          "title": "Private Key Path for Key Pair Authentication",
          "description": "The path to the private key file for the Snowflake Key Pair Authentication"
        },
        "private_key_passphrase": {
          "type": "string",
          "title": "Private Key Passphrase for Key Pair Authentication",
          "description": "The passphrase for the private key file for the Snowflake Key Pair Authentication"
        },
        "token_file_path": {
          "type": "string",
          "title": "Token File Path for OAuth",
          "description": "The path to the token file for the Snowflake OAuth Authentication"
        },
        "workload_identity_provider": {
          "type": "string",
          "title": "Workload Identity Provider",
          "description": "The workload identity provider to use for WIF authentication",
          "enum": ["azure", "aws", "gcp", "oidc"]
        },
        "workload_identity_entra_resource": {
          "type": "string",
          "title": "Workload Identity Entra Resource",
          "description": "e resource to use for WIF authentication on Azure environment"
        }
      },
      "additionalProperties": true,
      "x-tombi-table-keys-order": "schema"
    }
  }
}
