This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
vet sees exact values as optional fields #740
Labels
roadmap/cli
Specific tag for roadmap issue #337
roadmap/requiredfield
Related to required fields proposal.
Milestone
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
Having a cue schema and a yaml data file:
Run
cue vet
to validatedata.yml
against the schema:What did you expect to see?
I expect cue to report the following errors:
env.dev1
— missing requiredkafka_topic
field,env.dev2
— unexpected fieldtypo_topic
,env.dev3
— conflicting value inkafka_topic
field: gottypo_topic1
, want "topic1"What did you see instead?
cue
doesn't report the error about missing field inenv.dev1
. Only the errors inenv.dev2
andenv.dev3
:Note, in the example above, I could set the constraint for
kafka_topic
field via a RegExp=~"^topic1$"
. The issue is that the current behaviour ofcue vet
feels unintuitive.The text was updated successfully, but these errors were encountered: