encoding/jsonschema: require explicit package name
It is not what it should be by default or that it
is required at all, so don't specify by default.
Also add file documentation.
Change-Id: Ic7d508853f6743324b70da3d8141b98f0682d232
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/5183
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/jsonschema/jsonschema.go b/encoding/jsonschema/jsonschema.go
index 8c496e6..f685c46 100644
--- a/encoding/jsonschema/jsonschema.go
+++ b/encoding/jsonschema/jsonschema.go
@@ -53,6 +53,8 @@
// A Config configures a JSON Schema encoding or decoding.
type Config struct {
+ PkgName string
+
ID string // URL of the original source, corresponding to the $id field.
// TODO: configurability to make it compatible with OpenAPI, such as