Reproduction
Repo: accordproject/cicero-template-library PR #484, template src/supply-agreement-loc.
grammar.tem.md (excerpt):
An initial payment of {{% importerLOCAmount / 2.0 %}} will be made immediately upon sight ...
model.cto:
@template
asset TemplateModel extends Clause {
o Double importerLOCAmount
...
}
Driver:
const t = await Template.fromDirectory('./src/supply-agreement-loc');
await new TemplateArchiveProcessor(t).draft(data, 'markdown', {});
Observed
Error: Generated invalid agreement: ValidationException: The instance "org.accordproject.ciceromark@0.6.0.Formula" is missing the required field "value".: {
"$class": "org.accordproject.commonmark@0.5.0.Document",
...
}
The engine produces a ciceromark@0.6.0.Formula node and then validates the output; the produced node is missing the required value field, so validation fails. The formula has nothing fancy — a single division of a model field by a constant.
Expected
draft() evaluates the inline formula, sets the resulting string on Formula.value, and produces a valid AgreementMark document.
Versions
@accordproject/template-engine@3.0.1
@accordproject/cicero-core@0.26.0
@accordproject/concerto-core@4.1.0
Reproduction
Repo:
accordproject/cicero-template-libraryPR #484, templatesrc/supply-agreement-loc.grammar.tem.md(excerpt):model.cto:Driver:
Observed
The engine produces a
ciceromark@0.6.0.Formulanode and then validates the output; the produced node is missing the requiredvaluefield, so validation fails. The formula has nothing fancy — a single division of a model field by a constant.Expected
draft()evaluates the inline formula, sets the resulting string onFormula.value, and produces a valid AgreementMark document.Versions
@accordproject/template-engine@3.0.1@accordproject/cicero-core@0.26.0@accordproject/concerto-core@4.1.0