Add current configuration value navigation
This commit is contained in:
@@ -115,6 +115,7 @@ type schemaBuilder struct {
|
||||
building map[reflect.Type]bool
|
||||
journal []reflect.Type
|
||||
secrets SecretBinding
|
||||
lookup bool
|
||||
}
|
||||
|
||||
func (b *schemaBuilder) describe(current reflect.Type, path Path) (*typeDescriptor, *schemaIssue) {
|
||||
@@ -128,6 +129,11 @@ func (b *schemaBuilder) describe(current reflect.Type, path Path) (*typeDescript
|
||||
defer delete(b.building, current)
|
||||
|
||||
fail := func(code Code, message string) (*typeDescriptor, *schemaIssue) {
|
||||
// Lookup may reach unsupported values as terminals; they remain leaves.
|
||||
if b.lookup && (code == CodeSchemaUnsupportedType || code == CodeSchemaTextCodec) {
|
||||
descriptor.kind = descriptorInvalid
|
||||
return descriptor, nil
|
||||
}
|
||||
delete(b.cache, current)
|
||||
return nil, &schemaIssue{code: code, path: path.clone(), message: message}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user