Fix generation of anchors for additional properties (#1488)
but objects defined under `additionalProperties` missed out on them. This fixes that.
This commit is contained in:
parent
cdbf44eef0
commit
c662976fab
2 changed files with 7 additions and 11 deletions
1
changelogs/internal/newsfragments/1488.clarification
Normal file
1
changelogs/internal/newsfragments/1488.clarification
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Fix generation of anchors for additional properties
|
|
@ -43,18 +43,13 @@
|
||||||
*/}}
|
*/}}
|
||||||
{{ if $this_object.additionalProperties }}
|
{{ if $this_object.additionalProperties }}
|
||||||
{{ if reflect.IsMap $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
|
{{ $additional_objects = partial "get-additional-objects" (dict
|
||||||
"this_object" $property
|
"this_object" $this_object.additionalProperties
|
||||||
"additional_objects" $additional_objects
|
"additional_objects" $additional_objects
|
||||||
"anchor_base" $anchor_base
|
"anchor_base" $anchor_base
|
||||||
"name" (printf "%s.%s" $name $key)
|
"name" (printf "%s.additional" $name)
|
||||||
) }}
|
) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue