metadata.json¶
Packages contain a metadata.json
file of the following schema:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"package_name": {
"description": "The name that identifies a package uniquely (up to versions).",
"type": "string",
"pattern": "^[a-zA-Z0-9.]+$",
"maxLength": 50
},
"package_version": {
"description": "The version of the package.",
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+\\.\\d+$"
},
"common_package_metadata": {
"description": "Common parts of metadata.json for different package types",
"type": "object",
"properties": {
"package_format": {
"description": "Specifies the format of this package.",
"type": "string",
"enum": [
"XFP-DEP1.0",
"XFP-TT1.0",
"XFP-WF1.0"
]
},
"name": {
"$ref": "#/definitions/package_name"
},
"display_name": {
"description": "A nicer name for the package typically used in the UI (when uniqueness is not critical).",
"type": "string",
"pattern": "^[^\n]+$",
"maxLength": 50
},
"version": {
"$ref": "#/definitions/package_version"
},
"summary": {
"description": "A short summary of the package.",
"type": "string",
"pattern": "^[^\n]*$"
},
"description_filename": {
"description": "The filename of a detailed description of the package.",
"type": "string"
},
"citation_cff_filename": {
"description": "The filename of a CITATION.cff file. https://citation-file-format.github.io/",
"type": "string"
},
"remarks": {
"description": "Custom user remarks",
"type": "string"
},
"author": {
"description": "Contains various authorship information.",
"type": "object",
"properties": {
"name": {
"description": "The name of the package author.",
"type": "string"
},
"email": {
"description": "The email of the package author.",
"type": "string"
},
"website": {
"description": "The website of the package author.",
"type": "string"
}
},
"additionalProperties": false
}
}
},
"dependency_package_metadata": {
"description": "metadata.json of a Dependency package",
"allOf": [
{
"$ref": "#/definitions/common_package_metadata"
}
],
"properties": {
"package_format": {
"const": "XFP-DEP1.0"
},
"name": {},
"display_name": {},
"version": {},
"summary": {},
"description_filename": {},
"citation_cff_filename": {},
"remarks": {},
"author": {},
"install": {
"description": "A command line including arguments that should be executed to install the dependency. The command line is relative to the 'install' subfolder in the unpackaged folder of this package.",
"type": "string"
},
"environment": {
"description": "Environment variables that should be defined for jobs using this package. In the value %xamflow_package_content_path% gets replaced by the unpackaged content subfolder of this package.",
"type": "object",
"additionalProperties": true
},
"platform": {
"description": "Platform specific sections",
"type": "array",
"items": {
"type": "object",
"properties": {
"os": {
"description": "Operating system",
"type": "string",
"enum": [
"windows",
"linux"
]
},
"install": {
"description": "Command line to use on that platform.",
"type": "string"
},
"environment": {
"description": "Environment variables to define on that platform.",
"type": "object",
"additionalProperties": true
}
}
}
},
"dependencies": {
"description": "A list of dependency packages (identified by name with a version requirement) that are required to install this dependency package.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "The Dependency Package name",
"$ref": "#/definitions/package_name"
},
"version": {
"description": "The Dependency Package version requirement that must be satisfied.",
"$ref": "#/definitions/package_version"
}
},
"additionalProperties": false,
"required": [
"name",
"version"
]
}
},
"parameter_types": {
"description": "A list of parameter types defined by this dependency package.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "The name of the parameter type.",
"type": "string"
},
"$ref": {
"description": "A JSON Schema reference to a file defining the parameter type.",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"name",
"$ref"
]
}
}
},
"additionalProperties": false,
"required": [
"package_format",
"name",
"version"
]
},
"task_type_package_metadata": {
"description": "metadata.json of a Task Type package",
"allOf": [
{
"$ref": "#/definitions/common_package_metadata"
}
],
"properties": {
"package_format": {
"const": "XFP-TT1.0"
},
"name": {},
"display_name": {},
"version": {},
"summary": {},
"description_filename": {},
"citation_cff_filename": {},
"remarks": {},
"behavior": {
"description": "Indicates the behavior of the task type.",
"type": "string",
"enum": [
"InteractiveSource",
"InteractiveFollower",
"ProcessingSource",
"ProcessingFollower",
"InteractiveProcessingFollower",
"InteractiveProcessingSource"
]
},
"command": {
"description": "A command line including arguments that should be executed to start processing. The command line is relative to the `content` subfolder of the unpackaged folder of this package. Required if `behavior` is `ProcessingSource`, `ProcessingFollower`, `InteractiveProcessingFollower` or `InteractiveProcessingSource`. Not allowed otherwise.",
"type": "string"
},
"ui": {
"description": "Optional name of the UI to use if `behavior` is `InteractiveSource` or `InteractiveFollower`. Not allowed otherwise.",
"$ref": "#/definitions/package_name"
},
"ui_commands": {
"description": "Optional set of UI commands to use if `behavior` is `InteractiveSource` or `InteractiveFollower`. Not allowed otherwise.",
"type": "array",
"items": {
"type": "object",
"properties": {
"display_name": {
"description": "Name of the command shown in UI.",
"type": "string"
},
"command": {
"description": "Command to execute.",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"display_name",
"command"
]
}
},
"ui_config": {
"description": "Optional UI-specific configuration to use if `ui` is specified. Not allowed otherwise.",
"type": "object",
"properties": {
"supported_file_extensions": {
"description": "Supported file extensions, for ui values XF.Data.SelectForeignFile or XF.Data.AddForeignFile.",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
]
},
"dependencies": {
"description": "A list of dependency packages (identified by name with a version requirement) that are required to successfully execute a job with this task type.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "The Dependency Package name",
"$ref": "#/definitions/package_name"
},
"version": {
"description": "The Dependency Package version requirement that must be satisfied.",
"$ref": "#/definitions/package_version"
}
},
"additionalProperties": false,
"required": [
"name",
"version"
]
}
},
"author": {}
},
"additionalProperties": false,
"required": [
"package_format",
"name",
"version",
"behavior"
]
},
"task_type_metadata": {
"description": "metadata field of a task type in the HTTP API",
"$ref": "#/definitions/task_type_package_metadata"
},
"workflow_package_metadata": {
"description": "metadata.json of a Workflow package",
"allOf": [
{
"$ref": "#/definitions/common_package_metadata"
}
],
"properties": {
"package_format": {
"const": "XFP-WF1.0"
},
"name": {},
"display_name": {},
"version": {},
"summary": {},
"description_filename": {},
"citation_cff_filename": {},
"remarks": {},
"author": {},
"title_image_filename": {
"description": "Filename of an image representing the workflow. The file is stored as a workflow config file.",
"type": "string"
},
"priority_minimum": {
"description": "Optional. Only start processing jobs with this (or higher) priority.",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"package_format",
"name",
"version"
]
},
"workflow_metadata": {
"description": "metadata field of a workflow in the HTTP API",
"allOf": [
{
"$ref": "#/definitions/workflow_package_metadata"
}
],
"properties": {
"package_format": {
"const": "XFP-WF1.0"
},
"name": {},
"display_name": {},
"version": {},
"summary": {},
"description_filename": {},
"citation_cff_filename": {},
"remarks": {},
"author": {},
"title_image_filename": {},
"created": {
"description": "UTC timestamp of when this workflow was created",
"type": "string",
"format": "date-time"
},
"created_by_user_serial": {
"description": "Serial of the user who created this workflow",
"type": "integer"
}
},
"required": [
"package_format",
"name",
"version"
]
},
"project_metadata": {
"description": "metadata field of a project in the HTTP API",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"title_image_filename": {
"description": "Filename of an image representing the project. The file is stored as a project config file.",
"type": "string"
},
"remarks": {
"description": "Custom user remarks",
"type": "string"
},
"sequences": {
"description": "Explicit named sequences that are important in this project",
"type": "array",
"items": {
"description": "Explicit named sequence",
"type": "object",
"properties": {
"task_serial": {
"description": "Task containing the sequence",
"type": "integer"
},
"output_key": {
"description": "Name of the output parameter constituting the sequence",
"type": "string"
},
"display_name": {
"description": "Display name of the sequence",
"type": "string"
}
},
"required": [
"task_serial",
"output_key",
"display_name"
]
}
},
"created": {
"description": "UTC timestamp of when this project was created",
"type": "string",
"format": "date-time"
},
"created_by_user_serial": {
"description": "Serial of the user who created this project",
"type": "integer"
},
"members": {
"description": "A list of users who have access to this project",
"type": "array",
"items": {
"description": "Defines the membership of a user in this project",
"type": "object",
"properties": {
"user_serial": {
"description": "Serial of the user",
"type": "integer"
}
}
}
}
},
"required": [
"name"
]
},
"workflow_package_task_metadata": {
"description": "metadata of a task in tasks.json of a Workflow package",
"type": "object",
"properties": {
"name": {
"description": "Optional name of the task",
"type": "string"
},
"remarks": {
"description": "Custom user remarks",
"type": "string"
},
"favorite_input_keys": {
"description": "Favorite input parameters of this task.",
"type": "array",
"items": {
"description": "Input parameter key",
"type": "string"
}
},
"favorite_output_keys": {
"description": "Favorite output parameters of this task.",
"type": "array",
"items": {
"description": "Output parameter key",
"type": "string"
}
},
"input_arrow_styles": {
"description": "Style settings for input arrows.",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"description": "Input parameter key",
"type": "string"
},
"style": {
"description": "Style to use for displaying input arrow.",
"type": "string",
"enum": [
"invisible",
"dot",
"dash",
"solid"
]
}
}
}
},
"graph_layout_position": {
"description": "The 2D graph layout position.",
"type": "array",
"items": {
"description": "X or Y position",
"type": "integer"
}
},
"initial_job_state": {
"description": "The initial state of tasktypes that support e.g. interactive and processing.",
"enum": [
"ReadyForProcessing",
"ReadyForInteractive"
]
},
"input_display_names": {
"description": "Optional display names of the input parameters, by key.",
"type": "object",
"additionalProperties": true
},
"output_display_names": {
"description": "Optional display names of the output parameters, by key.",
"type": "object",
"additionalProperties": true
},
"priority": {
"description": "Optional priority of the task.",
"type": "integer"
},
"spawned_by": {
"description": "Optional information in case jobs of this task will be spawned by a processing job.",
"type": "object",
"properties": {
"task_serial": {
"description": "The 0-based index of the earlier task that will spawn jobs of this task.",
"type": "integer"
},
"spawn_key": {
"description": "Key for this task, used by the spawning task to identify it.",
"type": "string"
}
}
},
"transient": {
"description": "Can job results be deleted and potentially recomputed? Defaults to false.",
"type": "boolean"
}
},
"required": [
]
},
"task_metadata": {
"description": "metadata field of a task in the HTTP API",
"allOf": [
{
"$ref": "#/definitions/workflow_package_task_metadata"
}
],
"properties": {
"name": {},
"remarks": {},
"favorite_input_keys": {},
"favorite_output_keys": {},
"input_arrow_styles": {},
"graph_layout_position": {},
"initial_job_state": {},
"input_display_names": {},
"output_display_names": {},
"priority": {},
"transient": {},
"sequences": {
"description": "Sequences linked to this task. Only used in Manage Sequence tasks.",
"type": "array",
"items": {
"description": "Implicit sequence",
"type": "object",
"properties": {
"task_serial": {
"description": "Task containing the sequence",
"type": "integer"
},
"output_key": {
"description": "Name of the output parameter constituting the sequence",
"type": "string"
}
},
"required": [
"task_serial",
"output_key"
]
}
},
"spawned_by": {
"description": "Optional information in case this task was spawned by a processing job.",
"type": "object",
"properties": {
"job_serial": {
"description": "Job serial of job that spawned this task.",
"type": "integer"
},
"task_serial": {
"description": "Task serial of task that spawned this task.",
"type": "integer"
},
"spawn_key": {
"description": "Key for this task, used by the spawning task to identify it again later.",
"type": "string"
}
}
}
},
"required": [
]
}
}
}