Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TemplateMark not rendering relationships "resource" data #13

Open
martinhalford opened this issue Aug 1, 2023 · 0 comments
Open

TemplateMark not rendering relationships "resource" data #13

martinhalford opened this issue Aug 1, 2023 · 0 comments

Comments

@martinhalford
Copy link
Member

martinhalford commented Aug 1, 2023

Context

Consider the template "Late Delivery and Penalty".

The model contains the definition:

import [email protected] from https://models.accordproject.org/accordproject/[email protected]

@template
asset LateDeliveryAndPenaltyContract extends Contract {
  --> Party buyer
  --> Party seller

  /* ...rest of asset definition here
}

The data.json reads as follows:

{
    "$class": "org.accordproject.latedeliveryandpenalty@0.18.0.LateDeliveryAndPenaltyContract",
    "buyer": "resource:[email protected]#Steve",
    "seller": "resource:[email protected]#Dan",
     ...etc...
}

The grammar is defined as:

## Late Delivery and Penalty.

In case of delayed delivery{{#if forceMajeure}} except for Force Majeure cases,{{/if}}
{{seller}} (the Seller) shall pay to {{buyer}} (the Buyer) for every {{penaltyDuration}}
...

Expected Behavior

As per olde Template Studio, the text used to render as:

Late Delivery and Penalty.
----

In case of delayed delivery except for Force Majeure cases,
"Dan" (the Seller) shall pay to "Steve" (the Buyer) for every 2 days

Actual Behavior

The Template Playground renders the same model, grammar and data as:

## Late Delivery and Penalty.

In case of delayed delivery except for Force Majeure cases, 
"resource:[email protected]#Dan" (the Seller) shall pay to "resource:[email protected]#Steve" (the Buyer) for every {"$class":"[email protected]","amount":2,"unit":"days"} 
...
@martinhalford martinhalford changed the title TenplateMark not rendering relationships "resource" data TemplateMark not rendering relationships "resource" data Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant