From 78df7dd7189ba8d7a0a3c63b7cc46295fd99519d Mon Sep 17 00:00:00 2001 From: Jordan Rash Date: Thu, 23 Apr 2026 08:56:26 -0600 Subject: [PATCH] adds optional metadata to start workload request Signed-off-by: Jordan Rash --- models/api_shared.go | 9 +++++++++ models/schema/start-workload-request.json | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/models/api_shared.go b/models/api_shared.go index 7e750595..1461ade0 100644 --- a/models/api_shared.go +++ b/models/api_shared.go @@ -416,12 +416,18 @@ type StartWorkloadRequest struct { // A description of the workload Description string `json:"description"` + // Optional metadata + Metadata StartWorkloadRequestMetadata `json:"metadata,omitempty"` + // The name of the workload Name string `json:"name"` // The namespace of the workload Namespace string `json:"namespace"` + // Optional documentation reference + Reference *string `json:"reference,omitempty"` + // The agent specific run request for the workload RunRequest string `json:"run_request"` @@ -435,6 +441,9 @@ type StartWorkloadRequest struct { WorkloadType string `json:"workload_type"` } +// Optional metadata +type StartWorkloadRequestMetadata map[string]interface{} + // UnmarshalJSON implements json.Unmarshaler. func (j *StartWorkloadRequest) UnmarshalJSON(value []byte) error { var raw map[string]interface{} diff --git a/models/schema/start-workload-request.json b/models/schema/start-workload-request.json index 19dbbdd7..1efece6f 100644 --- a/models/schema/start-workload-request.json +++ b/models/schema/start-workload-request.json @@ -27,10 +27,19 @@ "run_request": { "type": "string", "description": "The agent specific run request for the workload" - }, + }, "tags": { "$ref": "./shared-tag-map.json", "description": "Placement tags associated with the workload" + }, + "reference": { + "type": "string", + "description": "Optional documentation reference" + }, + "metadata": { + "type": "object", + "description": "Optional metadata", + "additionalProperties": false } }, "required": [