Skip to content

Commit

Permalink
Refine workflow schema to exclude null values
Browse files Browse the repository at this point in the history
This commit updates the workflow schema to no longer accept null values.
Previously required fields that permitted nulls have been modified to become
non-required.

Excluding null as an acceptable value is a backward-incompatible change.
However, as we have not committed to maintain backward compatibility,
implementing this change is acceptable.
  • Loading branch information
sevein committed Sep 28, 2023
1 parent c8cd979 commit 6110d79
Show file tree
Hide file tree
Showing 7 changed files with 327 additions and 1,852 deletions.
231 changes: 28 additions & 203 deletions src/MCPServer/lib/assets/workflow-schema-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,50 +67,25 @@
"additionalProperties": {
"properties": {
"job_status": {
"oneOf": [
{
"$ref": "#/definitions/job_status"
},
{
"type": "null"
}
]
"$ref": "#/definitions/job_status"
},
"link_id": {
"oneOf": [
{
"$ref": "#/definitions/uuid"
},
{
"type": "null"
}
]
"$ref": "#/definitions/uuid"
}
},
"required": [
"job_status"
],
"type": "object"
},
"minProperties": 0,
"type": "object"
},
"fallback_job_status": {
"oneOf": [
{
"$ref": "#/definitions/job_status"
},
{
"type": "null"
}
]
"$ref": "#/definitions/job_status"
},
"fallback_link_id": {
"oneOf": [
{
"$ref": "#/definitions/uuid"
},
{
"type": "null"
}
]
"$ref": "#/definitions/uuid"
},
"group": {
"$ref": "#/definitions/translations"
Expand All @@ -120,7 +95,6 @@
"config",
"exit_codes",
"fallback_job_status",
"fallback_link_id",
"description",
"group"
],
Expand Down Expand Up @@ -164,55 +138,16 @@
"type": "string"
},
"arguments": {
"type": [
"string",
"null"
]
"type": "string"
},
"execute": {
"type": "string"
},
"filter_file_end": {
"type": [
"string",
"null"
]
},
"filter_file_start": {
"type": [
"string",
"null"
]
},
"filter_subdir": {
"type": [
"string",
"null"
]
},
"stderr_file": {
"type": [
"string",
"null"
]
},
"stdout_file": {
"type": [
"string",
"null"
]
}
},
"required": [
"@manager",
"@model",
"execute",
"arguments",
"filter_file_start",
"filter_file_end",
"filter_subdir",
"stdout_file",
"stderr_file"
"execute"
],
"type": "object"
},
Expand All @@ -227,56 +162,14 @@
"pattern": "StandardTaskConfig",
"type": "string"
},
"arguments": {
"type": [
"string",
"null"
]
},
"execute": {
"type": "string"
},
"filter_file_end": {
"type": [
"string",
"null"
]
},
"filter_file_start": {
"type": [
"string",
"null"
]
},
"filter_subdir": {
"type": [
"string",
"null"
]
},
"stderr_file": {
"type": [
"string",
"null"
]
},
"stdout_file": {
"type": [
"string",
"null"
]
}
},
"required": [
"@manager",
"@model",
"execute",
"arguments",
"filter_file_start",
"filter_file_end",
"filter_subdir",
"stdout_file",
"stderr_file"
"execute"
],
"type": "object"
},
Expand All @@ -292,14 +185,7 @@
"type": "string"
},
"chain_id": {
"oneOf": [
{
"$ref": "#/definitions/uuid"
},
{
"type": "null"
}
]
"$ref": "#/definitions/uuid"
},
"variable": {
"type": "string"
Expand All @@ -308,7 +194,6 @@
"required": [
"@manager",
"@model",
"chain_id",
"variable"
],
"type": "object"
Expand Down Expand Up @@ -371,31 +256,19 @@
"type": "string"
},
"chain_id": {
"oneOf": [
{
"$ref": "#/definitions/uuid"
},
{
"type": "null"
}
]
"$ref": "#/definitions/uuid"
},
"variable": {
"type": "string"
},
"variable_value": {
"type": [
"string",
"null"
]
"type": "string"
}
},
"required": [
"@manager",
"@model",
"chain_id",
"variable",
"variable_value"
"variable"
],
"type": "object"
},
Expand All @@ -411,55 +284,31 @@
"type": "string"
},
"arguments": {
"type": [
"string",
"null"
]
"type": "string"
},
"execute": {
"type": "string"
},
"filter_file_end": {
"type": [
"string",
"null"
]
"type": "string"
},
"filter_file_start": {
"type": [
"string",
"null"
]
"type": "string"
},
"filter_subdir": {
"type": [
"string",
"null"
]
"type": "string"
},
"stderr_file": {
"type": [
"string",
"null"
]
"type": "string"
},
"stdout_file": {
"type": [
"string",
"null"
]
"type": "string"
}
},
"required": [
"@manager",
"@model",
"execute",
"arguments",
"filter_file_start",
"filter_file_end",
"filter_subdir",
"stdout_file",
"stderr_file"
"execute"
],
"type": "object"
},
Expand All @@ -475,55 +324,31 @@
"type": "string"
},
"arguments": {
"type": [
"string",
"null"
]
"type": "string"
},
"execute": {
"type": "string"
},
"filter_file_end": {
"type": [
"string",
"null"
]
"type": "string"
},
"filter_file_start": {
"type": [
"string",
"null"
]
"type": "string"
},
"filter_subdir": {
"type": [
"string",
"null"
]
"type": "string"
},
"stderr_file": {
"type": [
"string",
"null"
]
"type": "string"
},
"stdout_file": {
"type": [
"string",
"null"
]
"type": "string"
}
},
"required": [
"@manager",
"@model",
"execute",
"arguments",
"filter_file_start",
"filter_file_end",
"filter_subdir",
"stdout_file",
"stderr_file"
"execute"
],
"type": "object"
},
Expand Down
Loading

0 comments on commit 6110d79

Please sign in to comment.