Open jryannel opened 6 months ago
You can use solution targets to specify import meta documents:
// demo.solution.yaml
schema: apigear.solution/1.0
targets:
- name: demo
imports: [meta.yaml]
meta:
go:
module: rpc
inputs:
- api/a.idl
- api/b.idl
output: out
template: templ
The meta document is a map of node fully qualified names with attached meta documents:
// meta.yaml
demo.bbb.Counter#value:
hello: world
This will allow you to print the meta information for the interface member:
// demo.go.tpl
{{- range .Properties }}
{{ printf "%v" .Meta.hello}}
{{- end }}
An external meta data document allows developers to inject meta information to models without storing them inside a model. The meta information is injected based on json paths into the external documents.
meta.yaml
select: demo.Counter.value meta: min: 0 max: 100