log name of mising field, not path

This commit is contained in:
Alexander Zielenski 2023-03-14 12:20:11 -07:00
parent 636c259474
commit 180c312f31
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" .) -}}
{{- . -}}
{{- else -}}
error: field "{{$.FieldPath}}" does not exist
error: field "{{index $.FieldPath (sub (len $.FieldPath) 1)}}" does not exist
{{- end -}}
{{- break -}}
{{- end -}}

View File

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