Improve error messages emitted by resolve-additional-types (#1303)

I forgot to set the `items` on an array definition, and got an extremely
opaque error. Hopefully this will improve the lives of anyone who makes a
similar mistake in future.
This commit is contained in:
Richard van der Hoff 2022-11-17 07:23:12 +00:00 committed by GitHub
parent cb2d5653ee
commit 1e393fbf92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 7 deletions

View file

@ -49,7 +49,7 @@
</summary>
{{ $additional_types := partial "json-schema/resolve-additional-types" (dict "schema" $definition) }}
{{ $additional_types := partial "json-schema/resolve-additional-types" (dict "schema" $definition "name" (printf "\"%s\"" $path)) }}
{{ $additional_types = uniq $additional_types }}
{{ range $additional_types }}