Skip to content

TemplateMark not rendering complex data types #14

Description

@martinhalford

Context

Consider the template "Late Delivery and Penalty".

The model contains the definition:

import org.accordproject.time@0.3.0.{Month, Day, TemporalUnit, Duration, PeriodUnit, Period} from https://models.accordproject.org/time@0.3.0.cto

@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": "org.accordproject.time@0.3.0.Duration",
        "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":"org.accordproject.time@0.3.0.Duration","amount":2,"unit":"days"} 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions