{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/spack-env-vars-yaml/latest.json",
  "title": "Spack env_vars configuration file schema",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/spack/schemas/refs/heads/main/schemas/env_vars.json",
    "sourceSha256": "e71b9dc5ed7a848023a1e1a5750ebd9897868bab0580a244656dfc2a773971e0",
    "fileMatch": [
      "**/*spack/**/env_vars.yaml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "env_vars": {
      "type": "object",
      "description": "Environment variable modifications to apply at runtime",
      "default": {},
      "properties": {
        "set": {
          "description": "Environment variables to set to specific values",
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          }
        },
        "unset": {
          "description": "Environment variables to remove/unset",
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "prepend_path": {
          "description": "Environment variables to prepend values to (typically PATH-like variables)",
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          }
        },
        "append_path": {
          "description": "Environment variables to append values to (typically PATH-like variables)",
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          }
        },
        "remove_path": {
          "description": "Values to remove from PATH-like environment variables",
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          }
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
