Open myitcv opened 1 month ago
In the JSON Schema documentation, it says:
The
default
keyword specifies a default value. This value is not used to fill in missing values during the validation process.
That says to me that the bug here is not that we are generating optional fields that include default values, but that we are including default values in the schema at all. I think that we should probably only generate pure schema values (no regular fields, no default values) from JSON Schema, at least for now. In the future, we can have the option to generate a template value that does include regular fields and defaults, but the current mixed approach seems somewhat wrong to me.
I'll retitle this issue accordingly.
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest release?
n/a - tested with tip.
What did you do?
What did you expect to see?
Passing test.
What did you see instead?