{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/bitrise-step.json",
  "$ref": "#/definitions/StepModel",
  "definitions": {
    "AptGetDepModel": {
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the package to be installed via apt-get."
        },
        "bin_name": {
          "type": "string",
          "description": "The name of the binary. This is optional and can be used if the binary name differs from the package name."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "BashStepToolkitModel": {
      "properties": {
        "entry_file": {
          "type": "string",
          "description": "The path to the bash script file that serves as the entry point for the Step."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "BrewDepModel": {
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the package to be installed via Homebrew."
        },
        "bin_name": {
          "type": "string",
          "description": "The name of the binary. This is optional and can be used if the binary name differs from the package name."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "CheckOnlyDepModel": {
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the binary or tool to check for. If it is not present on the system, the Step will fail before running."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "DependencyModel": {
      "properties": {
        "manager": {
          "type": "string",
          "description": "The package manager used to handle the dependency."
        },
        "name": {
          "type": "string",
          "description": "The name of the dependency."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "DepsModel": {
      "properties": {
        "brew": {
          "items": {
            "$ref": "#/definitions/BrewDepModel",
            "description": "A Homebrew dependency required by the Step."
          },
          "type": "array",
          "description": "List of Homebrew dependencies required by the Step."
        },
        "apt_get": {
          "items": {
            "$ref": "#/definitions/AptGetDepModel",
            "description": "An apt-get dependency required by the Step."
          },
          "type": "array",
          "description": "List of apt-get dependencies required by the Step."
        },
        "check_only": {
          "items": {
            "$ref": "#/definitions/CheckOnlyDepModel",
            "description": "A dependency that is only checked for existence."
          },
          "type": "array",
          "description": "List of dependencies that are only checked for existence."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "ExecutableModel": {
      "properties": {
        "storage_uri": {
          "type": "string",
          "description": "The URI where the executable binary is stored."
        },
        "hash": {
          "type": "string",
          "description": "The hash of the executable binary for integrity verification."
        }
      },
      "type": "object",
      "description": "Platform-specific executable binary."
    },
    "GoStepToolkitModel": {
      "required": ["package_name"],
      "properties": {
        "package_name": {
          "type": "string",
          "description": "The name of the Go package that serves as the entry point for the Step."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "ContainerReferenceConfigModel": {
      "type": "object",
      "description": "Additional configuration for a container reference.",
      "properties": {
        "recreate": {
          "type": "boolean",
          "description": "If true, the current container instance is discarded and a fresh one is started for this Step."
        }
      },
      "additionalProperties": false
    },
    "ContainerReferenceModel": {
      "description": "A reference to a container. Can be specified as a container ID string or as an object with the container ID as the key and optional configuration as the value.",
      "oneOf": [
        {
          "type": "string",
          "description": "The ID of the container as defined in the top-level `containers` map."
        },
        {
          "type": "object",
          "description": "The container ID with optional configuration.",
          "patternProperties": {
            ".*": {
              "$ref": "#/definitions/ContainerReferenceConfigModel"
            }
          },
          "additionalProperties": false,
          "minProperties": 1,
          "maxProperties": 1
        }
      ]
    },
    "StepModel": {
      "properties": {
        "title": {
          "type": "string",
          "description": "The human-readable title of the Step."
        },
        "summary": {
          "type": "string",
          "description": "A short summary of what the Step does."
        },
        "description": {
          "type": "string",
          "description": "A more detailed overview of the Step's function and configuration."
        },
        "website": {
          "type": "string",
          "description": "A web URL where users can find more information about the Step or the tools and services it implements."
        },
        "source_code_url": {
          "type": "string",
          "description": "The URL of the repository of the Step's source code."
        },
        "support_url": {
          "type": "string",
          "description": "A URL where users can get support for the Step."
        },
        "published_at": {
          "type": "string",
          "format": "date-time",
          "description": "The date and time when the Step was published to the Step Library. This is auto-generated and should not be set manually."
        },
        "source": {
          "$ref": "#/definitions/StepSourceModel",
          "description": "The source code repository and commit information of the Step."
        },
        "asset_urls": {
          "patternProperties": {
            ".*": {
              "type": "string",
              "description": "A URL pointing to a Step asset such as an icon image."
            }
          },
          "type": "object",
          "description": "URLs of assets associated with the Step, such as icon images. This is auto-generated and only set in the spec.json file in the Step Library."
        },
        "host_os_tags": {
          "items": {
            "type": "string",
            "description": "The host operating system tag."
          },
          "type": "array",
          "description": "This property defines the host operating systems the Step is compatible with. For example, `linux` or `macos`."
        },
        "project_type_tags": {
          "items": {
            "type": "string",
            "description": "The project type tag."
          },
          "type": "array",
          "description": "This property defines the project type category of the Step. For example, `flutter` or `ios`."
        },
        "type_tags": {
          "items": {
            "type": "string",
            "description": "A functional category tag. For example, `utility`, `test`, or `notification`."
          },
          "type": "array",
          "description": "This property defines the functional category of the Step. For example, `utility`, `test`, or `notification`."
        },
        "dependencies": {
          "items": {
            "$ref": "#/definitions/DependencyModel"
          },
          "type": "array",
          "description": "The dependencies required by the Step."
        },
        "toolkit": {
          "$ref": "#/definitions/StepToolkitModel",
          "description": "The toolkit used by the Step."
        },
        "deps": {
          "$ref": "#/definitions/DepsModel",
          "description": "The dependencies required by the Step."
        },
        "is_requires_admin_user": {
          "type": "boolean",
          "description": "If this property is true, the Step requires admin user privileges to run."
        },
        "is_always_run": {
          "type": "boolean",
          "description": "If this property is true, the Step will always run, even if a previous Step in the Workflow failed."
        },
        "is_skippable": {
          "type": "boolean",
          "description": "If this property is true, the build won't fail even if this Step fails. For example, if a Step restoring a cache archive fails, you might still want to run the build."
        },
        "run_if": {
          "type": "string",
          "description": "This property sets conditions for running a Step. It requires boolean value or a valid Go template expression."
        },
        "timeout": {
          "type": "integer",
          "description": "This property defines a time limit for a Step: if the Step runs longer than the defined time, the Step fails. Define the limit in seconds."
        },
        "no_output_timeout": {
          "type": "integer",
          "description": "This property defines a time limit for a Step that produces no output: if the Step runs for the defined number of seconds without producing any output, the Step fails. Define the limit in seconds."
        },
        "meta": {
          "patternProperties": {
            ".*": {
              "additionalProperties": true
            }
          },
          "type": "object",
          "description": "Additional metadata related to the Step."
        },
        "execution_container": {
          "$ref": "#/definitions/ContainerReferenceModel",
          "description": "The execution container for this Step. The Step runs inside the specified Docker container."
        },
        "service_containers": {
          "type": "array",
          "description": "Service containers to run alongside this Step as background services.",
          "items": {
            "$ref": "#/definitions/ContainerReferenceModel"
          }
        },
        "inputs": {
          "items": {
            "patternProperties": {
              ".*": {
                "additionalProperties": true
              }
            },
            "type": "object",
            "description": "An input parameter of the Step."
          },
          "type": "array",
          "description": "The inputs of the Step."
        },
        "outputs": {
          "items": {
            "patternProperties": {
              ".*": {
                "additionalProperties": true
              }
            },
            "type": "object",
            "description": "An output parameter of the Step."
          },
          "type": "array",
          "description": "The outputs the Step generates."
        },
        "executables": {
          "description": "Platform-specific executable binaries",
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/ExecutableModel"
          }
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "StepSourceModel": {
      "properties": {
        "git": {
          "type": "string",
          "description": "The Git repository URL of the Step's source code."
        },
        "commit": {
          "type": "string",
          "description": "The commit hash for the version tag of the Step's current version."
        }
      },
      "additionalProperties": false,
      "type": "object"
    },
    "StepToolkitModel": {
      "properties": {
        "bash": {
          "$ref": "#/definitions/BashStepToolkitModel",
          "description": "The Bash toolkit configuration for the Step."
        },
        "go": {
          "$ref": "#/definitions/GoStepToolkitModel",
          "description": "The Go toolkit configuration for the Step."
        }
      },
      "additionalProperties": false,
      "type": "object"
    }
  }
}
