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 8265c07 commit a0344ef
Show file tree
Hide file tree
Showing 7 changed files with 325 additions and 1,850 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 @@ -166,55 +140,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 @@ -229,56 +164,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 @@ -294,14 +187,7 @@
"type": "string"
},
"chain_id": {
"oneOf": [
{
"$ref": "#/definitions/uuid"
},
{
"type": "null"
}
]
"$ref": "#/definitions/uuid"
},
"variable": {
"type": "string"
Expand All @@ -310,7 +196,6 @@
"required": [
"@manager",
"@model",
"chain_id",
"variable"
],
"type": "object"
Expand Down Expand Up @@ -375,31 +260,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 @@ -415,55 +288,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 @@ -479,55 +328,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 a0344ef

Please sign in to comment.