feat(P27): validated per-module examples (D-058) + schema glob fix
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---
This commit is contained in:
@@ -131,7 +131,7 @@ jobs:
|
||||
import json, yaml, glob, jsonschema
|
||||
schema = json.load(open('schemas/contract.schema.json'))
|
||||
# Validate example contracts if they exist
|
||||
for example in glob.glob('modules/*/examples/*.yaml'):
|
||||
for example in glob.glob('modules/*/*/examples/*.yaml'):
|
||||
try:
|
||||
contract = yaml.safe_load(open(example))
|
||||
jsonschema.validate(contract, schema)
|
||||
|
||||
Reference in New Issue
Block a user