s1seven / schema-tools

Tools to create, validate and render certificates using Material Identity JSON schemas
https://materialidentity.org/
Apache License 2.0
1 stars 1 forks source link

bug: order quantity not available in CoA rendered in PDF #111

Closed stiebitzhofer closed 2 years ago

stiebitzhofer commented 2 years ago

Description

What keywords did you search in schema-tools issues before filing this one ? PDF

Is this a BUG REPORT or FEATURE REQUEST ? BUG

What you expected to happen : If Order/Quantity is not available it and Order/QuantityUnit should not be rendered on PDF is it results in NaN undefined. This will match the results of the HTML rendering.

Problem if OrderQuantity is unknown
getlarge commented 2 years ago

I guess the schema should be fixed first, currently Order.Quantity and Order.QuantityUnit are required properties. Also i don't see any conditional rendering in the HBS template, so you mean to implement it too ?

stiebitzhofer commented 2 years ago

I guess the schema should be fixed first, currently Order.Quantity and Order.QuantityUnit are required properties. Also i don't see any conditional rendering in the HBS template, so you mean to implement it too ?

You are right, it is required. As many example certificates do not include them we have to make it optional. You are also right on the HBS template. But let's address after the first round of review with user. In this I just add it to the list of known issues.