better comment

This commit is contained in:
Shreyas Goenka 2024-06-28 00:38:51 +02:00
parent a2aeacc589
commit 7d92fc7e5d
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
1 changed files with 4 additions and 0 deletions

View File

@ -169,6 +169,10 @@ func toSchema(golangType reflect.Type, docs *Docs, tracker *tracker) (*jsonschem
jsonSchema := &jsonschema.Schema{Type: rootJavascriptType} jsonSchema := &jsonschema.Schema{Type: rootJavascriptType}
// Variables can be set as the value at any node in the configuration tree. // Variables can be set as the value at any node in the configuration tree.
// At every node in the configuration tree we allow string values, provided
// they are a variable reference. Any node (scalar, object or array) can be
// set as a variable reference.
if rootJavascriptType != jsonschema.StringType { if rootJavascriptType != jsonschema.StringType {
jsonSchema = &jsonschema.Schema{ jsonSchema = &jsonschema.Schema{
AnyOf: []*jsonschema.Schema{ AnyOf: []*jsonschema.Schema{