Live Schema
Generating project schema extensions from live content, commerce, block, and capability feeds.
Quire type-checks against a schema. The built-in schema covers base StretchPress content and commerce model roots; real StretchPress projects can provide generated schema extensions from live content types, StretchShop objects, project blocks, and capability registries.
This is a pre-release platform contract. The source identifies it as a deterministic generator from a live model feed to a quire-project-schema extension.
Generate a schema
Generate a project schema from a live model feed:
quire generate-schema path/to/live-model.json --out path/to/quire.schema.json
If --out is omitted, the generated schema is written to stdout.
Use the generated schema with normal CLI commands:
quire check views/product.quire --schema path/to/generated.quire.schema.json
quire compile views/product.quire --schema path/to/generated.quire.schema.json --out dist/product.blocks.json
If --schema is omitted, the CLI searches upward from the .quire file for quire.schema.json and stretchpress.schema.json.
Live model feed
From examples/live-model.json:
{
"$schema": "https://stretchgroup.dev/schemas/quire-live-model.v1.json",
"version": 1,
"primitives": ["CampaignID"],
"contentTypes": {
"Campaign": {
"fields": {
"id": "CampaignID",
"headline": "String",
"slug": "String",
"active": "Boolean",
"offers": "Offer[]"
}
},
"Offer": {
"fields": {
"code": "String",
"amount": "Money"
}
}
},
"commerceTypes": {
"SubscriptionPlan": {
"fields": {
"id": "String",
"title": "String",
"price": "Money"
}
}
},
"capabilities": {
"marketing.campaign.open": {
"args": ["CampaignID"],
"returns": "Action"
}
}
}
Live feeds may include additional primitives, content types, commerce types, capabilities, view props, and block definitions.
Type specs
Type specs are strings or union arrays, such as String, Product, Product[], Image?, or ["String", "Number", "Money"].
Generated schemas should reference only built-in types or types defined in the same extension. The type checker rejects unknown model, prop, and capability types when a .quire file uses them.
Boundary
Generated schemas define data and declarative capabilities only. They must not contain executable code, raw HTML, raw CSS, raw JavaScript, PHP, Liquid, network instructions, database queries, or runtime hooks.