4bd07a4fae
Add modules/<name>/examples/ directories with simple.yaml + complex.yaml (+ mysql.yaml for RDS) for every primitive and module pattern. All 25 example contracts validate against schemas/contract.schema.json. Update the contract schema to allow object/array input values (for env vars). Fix the platform-test schema-validation glob to modules/*/*/examples/*.yaml to match the nested l1/l2 path structure. Update the microservice sample contract note (env objects now permitted by the schema). ---ci--- project: acdl phase: 27 milestone: v1.7 status: execute ---/ci---
29 lines
1.4 KiB
JSON
29 lines
1.4 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://acdl.cloudinit.dev/schemas/contract.schema.json",
|
|
"title": "ACDL Consumer Contract",
|
|
"description": "A consumer contract declares intent: which module to deploy, in which environment, with which inputs. The contract references the central ACDL pipeline via 'uses' and declares the module name (matching a registry key), environment, and inputs. The contract resolver resolves this to a Target Stack instance.",
|
|
"type": "object",
|
|
"required": ["uses", "module", "environment", "inputs"],
|
|
"properties": {
|
|
"uses": {
|
|
"type": "string",
|
|
"description": "Reference to the central ACDL deployment pipeline (e.g. 'acdl/pipelines/deploy.yaml@v1')."
|
|
},
|
|
"module": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9-]*$",
|
|
"description": "Module name matching a registry key (L1 primitive or L2 composition)."
|
|
},
|
|
"environment": {
|
|
"type": "string",
|
|
"enum": ["dev", "qa", "prod", "dr"],
|
|
"description": "Target environment. dev = autonomous; qa/prod/dr = HITL gates."
|
|
},
|
|
"inputs": {
|
|
"type": "object",
|
|
"description": "Module-specific inputs (bucket_name, region, image, port, env, etc.). Validated at resolution time against the module's interface.json or composition.json.",
|
|
"additionalProperties": {"type": ["string", "number", "boolean", "object", "array"]}
|
|
}
|
|
}
|
|
} |