Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve json schema #268

Merged
merged 2 commits into from
Oct 26, 2024
Merged
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
167 changes: 99 additions & 68 deletions docs/static/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,27 @@
"type": "array",
"description": "List of mixin files to include.",
"items": {
"type": "string"
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "URL to the mixin file."
},
"version": {
"type": "number",
"description": "Version of the mixin file."
}
},
"required": [
"url"
]
}
]
}
},
"env": {
Expand All @@ -35,87 +55,98 @@
"description": "Set of commands to execute.",
"patternProperties": {
"^[a-zA-Z][a-zA-Z0-9_:-]*$": {
"type": "object",
"properties": {
"description": {
"oneOf": [
{
"type": "string",
"description": "A description of the command."
"description": "Command as a string."
},
"options": {
{
"$ref": "#/definitions/command_object"
}
]
}
}
}
},
"required": [
"commands"
],
"definitions": {
"command_object": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "A description of the command."
},
"options": {
"type": "string",
"description": "Options for the command in docopt format."
},
"cmd": {
"oneOf": [
{
"type": "string",
"description": "Options for the command in docopt format."
},
"cmd": {
"oneOf": [
{
"type": "string",
"description": "Command as a string."
},
{
"type": "array",
"description": "Command as a list of strings.",
"items": {
"type": "string"
}
},
{
"type": "object",
"description": "Command as an object with key as named command and value as a script",
"patternProperties": {
"^[a-zA-Z_][a-zA-Z0-9_]*$": {
"oneOf": [
{
"type": "string",
"description": "Command as a string."
},
{
"type": "array",
"description": "Command as a list of strings.",
"items": {
"type": "string"
}
}
]
}
}
}
]
"description": "Command as a string."
},
"depends": {
{
"type": "array",
"description": "Command as a list of strings.",
"items": {
"type": "string"
}
},
"persist_checksum": {
"type": "boolean"
},
"checksum": {
"type": "array",
"items": {
"type": "string"
{
"type": "object",
"description": "Command as an object with key as named command and value as a script",
"patternProperties": {
"^[a-zA-Z_][a-zA-Z0-9_]*$": {
"oneOf": [
{
"type": "string",
"description": "Command as a string."
},
{
"type": "array",
"description": "Command as a list of strings.",
"items": {
"type": "string"
}
}
]
}
}
},
"env": {
"$ref": "#/definitions/env"
},
"after": {
"type": "string",
"description": "A shell sctipt to run after the command."
},
"work_dir": {
"type": "string",
"description": "A directory to run the command in."
}
]
},
"depends": {
"type": "array",
"items": {
"type": "string"
}
},
"persist_checksum": {
"type": "boolean"
},
"checksum": {
"type": "array",
"items": {
"type": "string"
}
},
"env": {
"$ref": "#/definitions/env"
},
"after": {
"type": "string",
"description": "A shell sctipt to run after the command."
},
"work_dir": {
"type": "string",
"description": "A directory to run the command in."
}
}
}
},
"required": [
"commands"
],
"definitions": {
},
"env": {
"type": "object",
"description": "Environment variables to set.",
Expand Down
Loading