Skip to content

Commit

Permalink
chore(json-schema): update
Browse files Browse the repository at this point in the history
  • Loading branch information
kanadgupta committed Jun 12, 2023
1 parent 2ab05ba commit c713b46
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions __tests__/helpers/github-workflow-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1149,8 +1149,9 @@
},
"type": {
"description": "A string representing the type of the input.",
"$comment": "https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatchinputsinput_idtype",
"type": "string",
"enum": ["string", "choice", "boolean", "environment"]
"enum": ["string", "choice", "boolean", "number"]
},
"options": {
"$comment": "https://github.blog/changelog/2021-11-10-github-actions-input-types-for-manual-workflows",
Expand All @@ -1161,10 +1162,17 @@
}
},
"allOf": [
{
"if": { "properties": { "type": { "const": "string" } }, "required": ["type"] },
"then": { "properties": { "default": { "type": "string" } } }
},
{
"if": { "properties": { "type": { "const": "boolean" } }, "required": ["type"] },
"then": { "properties": { "default": { "type": "boolean" } } },
"else": { "properties": { "default": { "type": "string" } } }
"then": { "properties": { "default": { "type": "boolean" } } }
},
{
"if": { "properties": { "type": { "const": "number" } }, "required": ["type"] },
"then": { "properties": { "default": { "type": "number" } } }
},
{
"if": { "properties": { "type": { "const": "choice" } }, "required": ["type"] },
Expand Down

0 comments on commit c713b46

Please sign in to comment.