Learn

Schemas and Report

A compact explanation of the three parts of a Cuddler document workflow and how each one behaves.

These three terms describe the shape of the workflow and the result it produces.

The three parts

  • Data Schema: validates the data JSON that will be used during rendering.
  • Template Schema: validates the template JSON separately from the data.
  • Rendered Report: the finished HTML output created after both inputs have passed validation.

How they differ

The Data Schema answers whether the input data is acceptable. The Template Schema answers whether the template is shaped correctly. The Rendered Report is the final artifact that appears only after both checks succeed.

A useful mental model

Think of the data and template as two different contracts that meet at render time. They are related, but they do not do the same job. That separation is a strength because it lets you diagnose issues more precisely.

How the two paths meet

The Data Schema and Template Schema stay separate while they validate their own inputs. Once both paths are valid, Cuddler uses them together at render time to produce one final Rendered Report.

Validation path one Data Schema

Checks that the data JSON has the right structure, fields, and values for the document.

Validation path two Template Schema

Checks that the template JSON is shaped correctly and is ready to render.

Render result Rendered Report

The final HTML output appears only after both validation paths succeed and are combined at render time.

Separate contracts. One render step. One finished report.