Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ const (
propRetryPolicy = "retryPolicy"
propTaskQueue = "taskQueue"
propType = "type"
propScheduleWorkflowName = "scheduleWorkflowName"
propScheduleWorkflowType = "scheduleWorkflowType"
propScheduleID = "scheduleId"
propScheduleInput = "scheduleInput"
Expand Down
7 changes: 0 additions & 7 deletions definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 0 additions & 12 deletions metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ func TestDocumentMetadataDefinitionShape(t *testing.T) {

for _, key := range []string{
propCanMaxHistory,
propScheduleWorkflowName,
propScheduleWorkflowType,
propScheduleID,
propScheduleInput,
Expand All @@ -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)
Expand Down Expand Up @@ -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},
Expand Down Expand Up @@ -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},
Expand Down
7 changes: 0 additions & 7 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 0 additions & 6 deletions schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading