{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/dagger/dagger/core/modules/legacy-module-config-with-user-fields",
  "$ref": "#/$defs/LegacyModuleConfigWithUserFields",
  "$defs": {
    "LegacyModuleConfigWithUserFields": {
      "properties": {
        "$schema": {
          "type": "string",
          "description": "The self-describing config schema."
        },
        "name": {
          "type": "string",
          "description": "The name of the module."
        },
        "engineVersion": {
          "type": "string",
          "description": "The version of the engine this module was last updated with."
        },
        "sdk": {
          "$ref": "#/$defs/SDK",
          "description": "The runtime this module uses. It is serialized as \"runtime\" in dagger-module.toml and as \"sdk\" in legacy dagger.json."
        },
        "blueprint": {
          "$ref": "#/$defs/ModuleConfigDependency",
          "description": "An optional blueprint module"
        },
        "toolchains": {
          "items": {
            "$ref": "#/$defs/ModuleConfigDependency"
          },
          "type": "array",
          "description": "Toolchain modules"
        },
        "include": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "Paths to explicitly include from the module, relative to the configuration file."
        },
        "dependencies": {
          "items": {
            "$ref": "#/$defs/ModuleConfigDependency"
          },
          "type": "array",
          "description": "The modules this module depends on."
        },
        "source": {
          "type": "string",
          "description": "The path, relative to this config file, to the subdir containing the module's implementation source code."
        },
        "codegen": {
          "$ref": "#/$defs/ModuleCodegenConfig",
          "description": "Codegen configuration for this module."
        },
        "exclude": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "Paths to explicitly exclude from the module, relative to the configuration file.\n\nDeprecated: Use !\u003cpattern\u003e in the include list instead."
        },
        "clients": {
          "items": {
            "$ref": "#/$defs/ModuleConfigClient"
          },
          "type": "array",
          "description": "The clients generated for this module."
        },
        "disableDefaultFunctionCaching": {
          "type": "boolean",
          "description": "If true, disable the new default function caching behavior for this module. Functions will instead default to the old behavior of per-session caching."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "name",
        "engineVersion"
      ],
      "description": "LegacyModuleConfigWithUserFields is the frozen public schema for dagger.json."
    },
    "ModuleCodegenConfig": {
      "properties": {
        "automaticGitignore": {
          "type": "boolean",
          "description": "Whether to automatically generate a .gitignore file for this module."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "ModuleConfigArgument": {
      "properties": {
        "function": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "The function chain to apply this argument to. Empty or nil for constructor."
        },
        "argument": {
          "type": "string",
          "description": "The name of the argument to override."
        },
        "default": {
          "type": "string",
          "description": "The default value to use for this argument."
        },
        "defaultPath": {
          "type": "string",
          "description": "The default path to use for File or Directory arguments."
        },
        "defaultAddress": {
          "type": "string",
          "description": "The default address to use for Container arguments."
        },
        "ignore": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "Ignore patterns for Directory arguments."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "argument"
      ],
      "description": "ModuleConfigArgument represents an argument override for a toolchain function"
    },
    "ModuleConfigClient": {
      "properties": {
        "generator": {
          "type": "string",
          "description": "The generator the client uses to be generated."
        },
        "directory": {
          "type": "string",
          "description": "The directory the client is generated in."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "generator",
        "directory"
      ]
    },
    "ModuleConfigDependency": {
      "properties": {
        "name": {
          "type": "string",
          "description": "The name to use for this dependency. By default, the same as the dependency module's name, but can also be overridden to use a different name."
        },
        "source": {
          "type": "string",
          "description": "The source ref of the module dependency."
        },
        "pin": {
          "type": "string",
          "description": "The pinned version of the module dependency."
        },
        "customizations": {
          "items": {
            "$ref": "#/$defs/ModuleConfigArgument"
          },
          "type": "array",
          "description": "Customizations configuration for toolchains that override function argument pragmas."
        },
        "ignoreChecks": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "IgnoreChecks is a list of check patterns to exclude from this toolchain. Patterns can use glob syntax to match check names."
        },
        "ignoreGenerators": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "IgnoreGenerators is a list of generator patterns to exclude from this toolchain. Patterns can use glob syntax to match generator names."
        },
        "ignoreServices": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "description": "IgnoreServices is a list of service (up) patterns to exclude from this toolchain. Patterns can use glob syntax to match service names."
        },
        "portMappings": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "type": "object",
          "description": "PortMappings maps service names to port forwarding rules. Keys are service names (e.g. \"web\", \"infra:database\"). Values are arrays of \"hostPort:containerPort\" strings (e.g. [\"3000:80\"])."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "name",
        "source"
      ]
    },
    "SDK": {
      "properties": {
        "source": {
          "type": "string"
        },
        "config": {
          "type": "object"
        },
        "debug": {
          "type": "boolean"
        },
        "experimental": {
          "additionalProperties": {
            "type": "boolean"
          },
          "type": "object",
          "description": "The experimental features enabled for this module."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "source"
      ],
      "description": "SDK represents the runtime/sdk field in module config."
    }
  }
}
