Do not add empty arrays to examples (#1849)
This commit is contained in:
parent
c4b4c896b7
commit
acec09f567
2 changed files with 4 additions and 3 deletions
1
changelogs/internal/newsfragments/1849.clarification
Normal file
1
changelogs/internal/newsfragments/1849.clarification
Normal file
|
@ -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…
Add table
Add a link
Reference in a new issue