grafana / thema

A CUE-based framework for portable, evolvable schema
Apache License 2.0
229 stars 12 forks source link

Use _#schema to generate TS files #188

Closed spinillos closed 1 year ago

spinillos commented 1 year ago

It rollback to the previous implementation since we need to use _#schema.

If you need some context: _#schema is a union between the schema and the _join value. We need this _join value to merge any extra information to the user's schemas (for example, validators).

For any reason, Cuetsy didn't like this union and it was unable to find the extends for the interfaces. We decided to split _#schema values temporally and merge them later to make it works. Finally we have a fix in Cuetsy to make it works.

sdboyer commented 1 year ago

Glad we finally got this sorted!

Let's use this as an excuse to introduce some simple corpus tests for ts as well - same as we have for encoding/gocode.