runbook-tutorials/schema/project.schema.json
tegwick f8ce4717a8
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 52s
Work Records / validate (push) Successful in 12s
Projects have their own name, description and goal; the template is shown only as origin
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
2026-09-29 14:12:21 +02:00

169 lines
3.4 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"
}
}
}
},
"description": {
"type": "string",
"description": "What this project is, in its own words. Not inherited from a template."
}
},
"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
}
]
}
}
}