Skip to content

Commit

Permalink
encoding/jsonschema: adjust doc comment
Browse files Browse the repository at this point in the history
I intended to add this change suggested by Daniel in https://cuelang.org/cl/1207007
but forgot to commit it.

Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I29dc19cfd1afb922d167015182c9413f2413d24b
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1207067
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
  • Loading branch information
rogpeppe committed Jan 13, 2025
1 parent 07ff0b5 commit 59b0f46
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions encoding/jsonschema/jsonschema.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,9 @@ type Config struct {
// only. Just `#` is preferred.
Root string

// AllowNonExistentRoot holds whether it's an error when there
// is no value at the above Root path. For example, when extracting
// an OpenAPI schema, the #/components/schemas path might not
// exist, but that could be considered OK even so.
// AllowNonExistentRoot prevents an error when there is no value at
// the above Root path. Such an error can be useful to signal that
// the data may not be a JSON Schema, but is not always a good idea.
AllowNonExistentRoot bool

// Map maps the locations of schemas and definitions to a new location.
Expand Down

0 comments on commit 59b0f46

Please sign in to comment.