Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

field not allowed: #content #38

Open
sjwl opened this issue Nov 16, 2022 · 1 comment
Open

field not allowed: #content #38

sjwl opened this issue Nov 16, 2022 · 1 comment

Comments

@sjwl
Copy link

sjwl commented Nov 16, 2022

// schema.cue
#a: {
  name: string
}
#a
# a.yaml
name: foo
> cuetils validate schema.cue a.yaml
a.yaml
----------------------
field not allowed: #content


Errors in 1 file(s)
> cuetils version  
cuetils ConfigDir "/Users/samlee/Library/Application Support/cuetils" <nil>

Version:     v0.4.0
Commit:      6263ed1672d52dfca3bb3cd7d5d27adfa102ec53

BuildDate:   2022-02-02T05:05:42Z
GoVersion:   go1.14
OS / Arch:   darwin amd64


Author:   Hofstadter, Inc
Homepage: https://docs.hofstadter.io
GitHub:   https://github.com/hofstadter-io/cuetils

Workaround

> cue vet schema.cue a.yaml
>
@verdverm
Copy link
Member

verdverm commented Nov 18, 2022

generally, you wouldn't write a definition, to then embed it at the top level, rather just put the fields at the top level, not sure if this example is a simplification of a larger code base. You might try making it hidden?

I also don't really support this tool anymore, you can see the CUE version is out of date and most functionality has been moved to github.com/hofstadter-io/hof

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants