A few things (like the type annotation for arbitary types) are used all the time. It would be better to move them into a set of partial templates.
The simplest solution would be to add a new folder for partials and load them before evaluating the json file.
Downside would be that we would need to introduce a naming convention, to ensure that the partial templates can be used by everyone.
Alternatively, we load the partials on a template-by-template basis. But then we need to ensure that all partials are always up-to-date
what happens if a new version requires a new partial template - how would the system know that it needs to be loaded/copied?
A third solution would add a config file for every template. In there one could specify the needed partials, but also other parameters like a config schema or a template engine (if we ever support more then just handlebars)
A few things (like the type annotation for arbitary types) are used all the time. It would be better to move them into a set of partial templates.
The simplest solution would be to add a new folder for partials and load them before evaluating the json file.
Alternatively, we load the partials on a template-by-template basis. But then we need to ensure that all partials are always up-to-date
A third solution would add a config file for every template. In there one could specify the needed partials, but also other parameters like a config schema or a template engine (if we ever support more then just handlebars)