cue: disallow bulk optional fields with other fields
This change is the first step to change the semantics
of bulk optional fields to apply only to additional fields.
The first step is to encourage bulk optional fields to be
in a struct with any other field.
`cue fmt` now rewrites violating bulk optional fields by
wrapping them in a embedded struct, which is
equivalent.
TestDiff was changed to ensure that diff will identify
the two forms as equivalent.
Issue #339
Change-Id: I52753ff9854598394726585b85b3c27caad85458
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/5781
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/jsonschema/jsonschema.go b/encoding/jsonschema/jsonschema.go
index 5f5791b..4a59ab1 100644
--- a/encoding/jsonschema/jsonschema.go
+++ b/encoding/jsonschema/jsonschema.go
@@ -17,7 +17,7 @@
// Mapping and Linking
//
// JSON Schema are often defined in a single file. CUE, on the other hand
-// idomatically defines schema as a definition.
+// idiomatically defines schema as a definition.
//
// CUE:
// $schema: which schema is used for validation.