Files
formulation/container/schemas/v2/derived-recipe.schema.json
nicholas 816b28e179
Build & Deploy Formulation / Build & Push Image (push) Successful in 15s
Build & Deploy Formulation / deploy (push) Successful in 12s
build and deploy Formulation application
Consolidate the application, culinary data model, read-only runtime, and registry-backed deployment.
2026-08-13 18:08:25 -05:00

58 lines
2.3 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://recipes.uuard.com/schemas/v2/derived-recipe.schema.json",
"title": "Disposable derived recipe values",
"description": "Calculated output. This document is never canonical culinary or purchasing input.",
"type": "object",
"required": ["schema_version", "recipe_id", "calculation_version", "calculated_at", "input_fingerprint"],
"additionalProperties": false,
"properties": {
"schema_version": { "$ref": "common.schema.json#/$defs/schemaVersion" },
"recipe_id": { "$ref": "common.schema.json#/$defs/id" },
"calculation_version": { "type": "integer", "minimum": 1 },
"calculated_at": { "$ref": "common.schema.json#/$defs/dateTime" },
"input_fingerprint": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
"cost": {
"type": "object",
"required": ["currency", "batch"],
"additionalProperties": false,
"properties": {
"currency": { "type": "string", "pattern": "^[A-Z]{3}$" },
"batch": { "$ref": "common.schema.json#/$defs/decimal" },
"per_serving": { "$ref": "common.schema.json#/$defs/decimal" },
"per_100g": { "$ref": "common.schema.json#/$defs/decimal" }
}
},
"nutrition": {
"type": "object",
"properties": {
"batch": { "type": "object", "additionalProperties": { "type": "number" } },
"per_serving": { "type": "object", "additionalProperties": { "type": "number" } },
"per_100g": { "type": "object", "additionalProperties": { "type": "number" } }
},
"additionalProperties": false
},
"allergens": {
"type": "array",
"items": {
"type": "object",
"required": ["allergen_id", "presence"],
"additionalProperties": false,
"properties": {
"allergen_id": { "$ref": "common.schema.json#/$defs/id" },
"presence": { "type": "string", "enum": ["contains", "may_contain", "unknown"] }
}
}
},
"completeness": {
"type": "object",
"additionalProperties": false,
"properties": {
"nutrition_weight_fraction": { "type": "number", "minimum": 0, "maximum": 1 },
"cost_weight_fraction": { "type": "number", "minimum": 0, "maximum": 1 }
}
},
"warnings": { "type": "array", "items": { "type": "string" } }
}
}