Also fixes run lists and scores mixing runs of different packs in one repository. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: sonnet Assistant-Process: 295952@bnt-lap001 Assistant-Session: e93f64ad-516c-46eb-9666-aad8d300c477
165 lines
3.2 KiB
JSON
165 lines
3.2 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://runbook-tutorials.invalid/schema/project/v0.1",
|
|
"title": "Project or project template",
|
|
"type": "object",
|
|
"required": [
|
|
"spec",
|
|
"id",
|
|
"title",
|
|
"runbooks"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"spec": {
|
|
"enum": [
|
|
"project/v0.1",
|
|
"project-template/v0.1"
|
|
]
|
|
},
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z0-9]+([.-][a-z0-9]+)*$"
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"minLength": 3
|
|
},
|
|
"goal": {
|
|
"type": "string"
|
|
},
|
|
"environment": {
|
|
"enum": [
|
|
"rehearsal",
|
|
"staging",
|
|
"production"
|
|
]
|
|
},
|
|
"template": {
|
|
"type": "string",
|
|
"description": "Id of the template this project was created from."
|
|
},
|
|
"attribute_sets": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"attributes": {
|
|
"$ref": "#/$defs/attributes"
|
|
},
|
|
"targets": {
|
|
"type": "object",
|
|
"propertyNames": {
|
|
"pattern": "^[a-z][a-z0-9-]*$"
|
|
},
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"attribute_sets": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"attributes": {
|
|
"$ref": "#/$defs/attributes"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"runbooks": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"pack"
|
|
],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"pack": {
|
|
"type": "string"
|
|
},
|
|
"target": {
|
|
"type": "string"
|
|
},
|
|
"after": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"attributes": {
|
|
"$ref": "#/$defs/attributes"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": {
|
|
"properties": {
|
|
"spec": {
|
|
"const": "project/v0.1"
|
|
}
|
|
}
|
|
},
|
|
"then": {
|
|
"required": [
|
|
"environment"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"$defs": {
|
|
"attributes": {
|
|
"type": "object",
|
|
"propertyNames": {
|
|
"pattern": "^[a-z][a-z0-9_]*$"
|
|
},
|
|
"additionalProperties": {
|
|
"$ref": "#/$defs/attribute"
|
|
}
|
|
},
|
|
"attribute": {
|
|
"oneOf": [
|
|
{
|
|
"type": [
|
|
"string",
|
|
"integer",
|
|
"boolean"
|
|
]
|
|
},
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"value": {
|
|
"type": [
|
|
"string",
|
|
"integer",
|
|
"boolean"
|
|
]
|
|
},
|
|
"requirement": {
|
|
"enum": [
|
|
"required",
|
|
"optional"
|
|
]
|
|
},
|
|
"note": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"minProperties": 1
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|