Do not add empty arrays to examples

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille 2024-06-07 14:57:02 +02:00
parent 5a86e384dd
commit 27274b72e7
No known key found for this signature in database
GPG key ID: 0C971D9DBC9D678D

View file

@ -35,9 +35,9 @@
*/}}
{{ if reflect.IsMap $this_object.items }}
{{ $items_example := partial "json-schema/resolve-example" $this_object.items }}
{{ $example = slice $items_example }}
{{ else }}
{{ $example = slice }}
{{ if $items_example }}
{{ $example = slice $items_example }}
{{ end }}
{{ end }}
{{ end }}