From 03157ba94f488ef02741b81dbd06dcf1767e320c Mon Sep 17 00:00:00 2001 From: Yash B Joshi <68319416+YJ-928@users.noreply.github.com> Date: Wed, 28 Oct 2026 16:25:36 +0530 Subject: [PATCH] refactor: drop scheduleWorkflowName from the schema No release of Studio uses it yet. document.metadata is open, so files that still set it keep validating. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Yash B Joshi <68319416+YJ-928@users.noreply.github.com> --- constants.go | 1 - definitions.go | 7 ------- metadata_test.go | 12 ------------ schema.json | 7 ------- schema.yaml | 6 ------ schema_test.go | 8 ++++---- 6 files changed, 4 insertions(+), 37 deletions(-) diff --git a/constants.go b/constants.go index f3ddb9d..5c46403 100644 --- a/constants.go +++ b/constants.go @@ -111,7 +111,6 @@ const ( propRetryPolicy = "retryPolicy" propTaskQueue = "taskQueue" propType = "type" - propScheduleWorkflowName = "scheduleWorkflowName" propScheduleWorkflowType = "scheduleWorkflowType" propScheduleID = "scheduleId" propScheduleInput = "scheduleInput" diff --git a/definitions.go b/definitions.go index 2186942..f7ead7a 100644 --- a/definitions.go +++ b/definitions.go @@ -420,13 +420,6 @@ var documentMetadataDefinition = &jsonschema.Schema{ "Defaults to document.workflowType; required when every top-level task is a Do task.", MinLength: utils.Ptr(1), }, - propScheduleWorkflowName: { - Type: typeString, - Title: "ScheduleWorkflowName", - Description: "Deprecated: use scheduleWorkflowType.", - MinLength: utils.Ptr(1), - Deprecated: true, - }, propScheduleID: { Type: typeString, Title: "ScheduleID", diff --git a/metadata_test.go b/metadata_test.go index 6405269..f9b6622 100644 --- a/metadata_test.go +++ b/metadata_test.go @@ -158,7 +158,6 @@ func TestDocumentMetadataDefinitionShape(t *testing.T) { for _, key := range []string{ propCanMaxHistory, - propScheduleWorkflowName, propScheduleWorkflowType, propScheduleID, propScheduleInput, @@ -168,8 +167,6 @@ func TestDocumentMetadataDefinitionShape(t *testing.T) { } assert.Equal(t, typeInteger, def.Properties[propCanMaxHistory].Type) - assert.Equal(t, typeString, def.Properties[propScheduleWorkflowName].Type) - assert.True(t, def.Properties[propScheduleWorkflowName].Deprecated, "scheduleWorkflowName is a deprecated alias") assert.Equal(t, typeString, def.Properties[propScheduleWorkflowType].Type) assert.False(t, def.Properties[propScheduleWorkflowType].Deprecated) assert.Equal(t, typeString, def.Properties[propScheduleID].Type) @@ -227,10 +224,6 @@ func TestDocumentMetadata_Validation(t *testing.T) { expectError bool }{ // ---- valid cases ---- - { - name: "scheduleWorkflowName string is accepted", - meta: map[string]any{"scheduleWorkflowName": testWorkflowType}, - }, { name: "scheduleWorkflowType string is accepted", meta: map[string]any{propScheduleWorkflowType: testWorkflowType}, @@ -269,11 +262,6 @@ func TestDocumentMetadata_Validation(t *testing.T) { }, // ---- invalid cases ---- - { - name: "scheduleWorkflowName as integer is rejected", - meta: map[string]any{"scheduleWorkflowName": 42}, - expectError: true, - }, { name: "scheduleWorkflowType as integer is rejected", meta: map[string]any{propScheduleWorkflowType: 42}, diff --git a/schema.json b/schema.json index 24a1879..e33add0 100644 --- a/schema.json +++ b/schema.json @@ -517,13 +517,6 @@ "title": "ScheduleInput", "description": "Set the input." }, - "scheduleWorkflowName": { - "type": "string", - "title": "ScheduleWorkflowName", - "description": "Deprecated: use scheduleWorkflowType.", - "deprecated": true, - "minLength": 1 - }, "scheduleWorkflowType": { "type": "string", "title": "ScheduleWorkflowType", diff --git a/schema.yaml b/schema.yaml index 22414d6..ed93248 100644 --- a/schema.yaml +++ b/schema.yaml @@ -305,12 +305,6 @@ $defs: description: Set the input. title: ScheduleInput type: array - scheduleWorkflowName: - deprecated: true - description: 'Deprecated: use scheduleWorkflowType.' - minLength: 1 - title: ScheduleWorkflowName - type: string scheduleWorkflowType: description: 'The workflow type the schedule starts: the document.workflowType or a top-level Do task. Defaults to document.workflowType; required when diff --git a/schema_test.go b/schema_test.go index b21b7a4..986249c 100644 --- a/schema_test.go +++ b/schema_test.go @@ -107,10 +107,10 @@ func TestSchema_ScheduleNeedsNoWorkflowKey(t *testing.T) { resolved := resolvedTestSchema(t) for name, meta := range map[string]map[string]any{ - "no document.metadata": nil, - "metadata without a key": {propScheduleID: "my-schedule"}, - "the workflow type key": {propScheduleWorkflowType: testWorkflowType}, - "the deprecated alias": {propScheduleWorkflowName: testWorkflowType}, + "no document.metadata": nil, + "metadata without a key": {propScheduleID: "my-schedule"}, + "the workflow type key": {propScheduleWorkflowType: testWorkflowType}, + "the old key, now unlisted": {"scheduleWorkflowName": testWorkflowType}, } { t.Run(name, func(t *testing.T) { doc := minimalWorkflow()