Skip to content

Commit

Permalink
Do not add empty arrays to examples
Browse files Browse the repository at this point in the history
Signed-off-by: Kévin Commaille <[email protected]>
  • Loading branch information
zecakeh committed Jun 7, 2024
1 parent 5a86e38 commit 27274b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions layouts/partials/json-schema/resolve-example.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down

0 comments on commit 27274b7

Please sign in to comment.