Add current configuration value navigation

This commit is contained in:
2026-11-21 04:03:37 +00:00
parent b3799be2fa
commit 654fe9d306
4 changed files with 175 additions and 1 deletions

View File

@@ -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}
}