log name of mising field, not path

Kubernetes-commit: 180c312f31f5de372eb27b5a120d5a6ce94bc07c
This commit is contained in:
Alexander Zielenski 2023-03-14 12:20:11 -07:00 committed by Kubernetes Publisher
parent ef349ea77d
commit f4936cb9cc
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ Takes dictionary as argument with keys:
{{- with include "output" (set $ "schema" .) -}} {{- with include "output" (set $ "schema" .) -}}
{{- . -}} {{- . -}}
{{- else -}} {{- else -}}
error: field "{{$.FieldPath}}" does not exist error: field "{{index $.FieldPath (sub (len $.FieldPath) 1)}}" does not exist
{{- end -}} {{- end -}}
{{- break -}} {{- break -}}
{{- end -}} {{- end -}}

View File

@ -336,7 +336,7 @@ func TestPlaintext(t *testing.T) {
}, },
{ {
// Shows that the typeguess puts Object tpye in title case // Shows that the typeguess puts Object tpye in title case
Name: "ArrayUnknown", Name: "ObjectTitle",
Subtemplate: "typeGuess", Subtemplate: "typeGuess",
Context: map[string]any{ Context: map[string]any{
"schema": map[string]any{ "schema": map[string]any{