Do not add empty arrays to examples (#1849)

pull/1506/merge
Kévin Commaille 6 months ago committed by GitHub
parent c4b4c896b7
commit acec09f567
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1 @@
Do not add empty arrays to examples.

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

Loading…
Cancel
Save