-
Hello I have a lot of jsonschema files that I'm looking to work with, as data. I've managed to convert jsonschema to cue by doing:
Example cue
Templates
Partial template for sql table columns
QuestionsThe output from is:
Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
See the txtar file below for details, I changed a bit of your template and added an extra file to demonstrate.
For both 2 & 3, I would enrich the input in CUE before sending to the template. Then just reference the values. So instead of needing to pass ROOT or required to the partial, write some CUE to enrich the in properties.
edit: There is another version of the |
Beta Was this translation helpful? Give feedback.
-
With regards to hof and refs, there is support for the I'm generally leaning on CUE for the foundational openapi / jsonschema support edit, a short example how you can extract the reference in a template. I have an openapi hof mod that is in early prototype stages, but I still want to think through it before sharing, it's a bit hacky, probably will be until CUE improves in these areas.
We need the |
Beta Was this translation helpful? Give feedback.
See the txtar file below for details, I changed a bit of your template and added an extra file to demonstrate.
-
) from text/template(dict "key" .value "ROOT" .)
helper.For both 2 & 3, I would enrich the input in CUE before sending to the template. Then just r…