Fix generation of anchors for additional properties (#1488)

but objects defined under `additionalProperties` missed out on them. This fixes
that.
pull/1509/head
Richard van der Hoff 2 years ago committed by GitHub
parent cdbf44eef0
commit c662976fab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1 @@
Fix generation of anchors for additional properties

@ -43,17 +43,12 @@
*/}}
{{ if $this_object.additionalProperties }}
{{ if reflect.IsMap $this_object.additionalProperties }}
{{ $additional_objects = $additional_objects | append (partial "clean-object" $this_object.additionalProperties) }}
{{ range $key, $property := $this_object.additionalProperties.properties }}
{{ $additional_objects = partial "get-additional-objects" (dict
"this_object" $property
"additional_objects" $additional_objects
"anchor_base" $anchor_base
"name" (printf "%s.%s" $name $key)
) }}
{{ end }}
{{ $additional_objects = partial "get-additional-objects" (dict
"this_object" $this_object.additionalProperties
"additional_objects" $additional_objects
"anchor_base" $anchor_base
"name" (printf "%s.additional" $name)
) }}
{{ end }}
{{ end }}

Loading…
Cancel
Save