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 complex data types #14

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

TemplateMark not rendering complex data types #14

martinhalford opened this issue Aug 1, 2023 · 2 comments

Comments

@martinhalford
Copy link
Member

Context

Consider the template "Late Delivery and Penalty".

The model contains the definition:

import [email protected].{Month, Day, TemporalUnit, Duration, PeriodUnit, Period} from https://models.accordproject.org/[email protected]

@template
asset LateDeliveryAndPenaltyContract extends Contract {
  ...etc...
  o Duration penaltyDuration
  ...etc...
}

The data.json reads as follows:

{
    "$class": "org.accordproject.latedeliveryandpenalty@0.18.0.LateDeliveryAndPenaltyContract",
     ...etc...
    "penaltyDuration": {
        "$class": "[email protected]",
        "amount": 2,
        "unit": "days"
    },
     ...etc...
}

The grammar is defined as:

## Late Delivery and Penalty.

.... for every {{penaltyDuration}}

Expected Behavior

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

Late Delivery and Penalty.
----

... for every 2 days

Actual Behavior

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

## Late Delivery and Penalty.

... for every {"$class":"[email protected]","amount":2,"unit":"days"} 
@jatinder14
Copy link

@mttrbrts I am here for gsoc24
I want to contribute to this project https://playground.accordproject.org/
would you be able to guide me
from where I should start
I will be highly thankful to you

@Sulochan-khadka
Copy link

@martinhalford If possible, kindly mention the steps to reproduce. As it seems a standard procedure while writing down an issue and it helps me a lot while solving the issues.

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

3 participants