vela def gen-cue
Generate CUE schema from Go code.
Synopsis
Generate CUE schema from Go code.
- This command provide a way to generate CUE schema from Go code,
- Which can be used to keep consistency between Go code and CUE schema automatically.
vela def gen-cue [flags] SOURCE.go
Examples
# Generate CUE schema for provider type
> vela def gen-cue -t provider /path/to/myprovider.go > /path/to/myprovider.cue
# Generate CUE schema for provider type with custom types
> vela def gen-cue -t provider --types *k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured=ellipsis /path/to/myprovider.go > /path/to/myprovider.cue
Options
-h, --help help for gen-cue
--nullable Whether to generate null enum for pointer type
-t, --type string Type of the definition to generate. Valid types: [provider]
--types stringToString Special types to generate, format: <package+struct>=[any|ellipsis]. e.g. --types=*k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured=ellipsis (default [])
Options inherited from parent commands
-V, --verbosity Level number for the log level verbosity
-y, --yes Assume yes for all user prompts
SEE ALSO
- vela def - Manage definitions.