From 59b0f4600c58f26e03acd434e879fedf7fc52203 Mon Sep 17 00:00:00 2001 From: Roger Peppe Date: Mon, 13 Jan 2025 11:23:58 +0000 Subject: [PATCH] encoding/jsonschema: adjust doc comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Change-Id: I29dc19cfd1afb922d167015182c9413f2413d24b Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1207067 Reviewed-by: Daniel Martí TryBot-Result: CUEcueckoo Unity-Result: CUE porcuepine --- encoding/jsonschema/jsonschema.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/encoding/jsonschema/jsonschema.go b/encoding/jsonschema/jsonschema.go index 14231f648da..a62c5b1110b 100644 --- a/encoding/jsonschema/jsonschema.go +++ b/encoding/jsonschema/jsonschema.go @@ -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.