|
|
@ -165,6 +165,7 @@
|
|
|
|
* (https://json-schema.org/understanding-json-schema/reference/combining.html#oneof)
|
|
|
|
* (https://json-schema.org/understanding-json-schema/reference/combining.html#oneof)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
{{ if $this_object.oneOf }}
|
|
|
|
{{ if $this_object.oneOf }}
|
|
|
|
|
|
|
|
{{ $updated_items := slice }}
|
|
|
|
{{ range $idx, $item := $this_object.oneOf }}
|
|
|
|
{{ range $idx, $item := $this_object.oneOf }}
|
|
|
|
{{ $res := partial "get-additional-objects" (dict
|
|
|
|
{{ $res := partial "get-additional-objects" (dict
|
|
|
|
"this_object" $item
|
|
|
|
"this_object" $item
|
|
|
@ -173,7 +174,11 @@
|
|
|
|
"name" (printf "%s.oneOf[%d]" $name $idx)
|
|
|
|
"name" (printf "%s.oneOf[%d]" $name $idx)
|
|
|
|
) }}
|
|
|
|
) }}
|
|
|
|
{{ $all_objects = $res.objects }}
|
|
|
|
{{ $all_objects = $res.objects }}
|
|
|
|
|
|
|
|
{{ $updated_items = $updated_items | append $res.schema }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Update the top-level schema with the updated subschemas for the items */
|
|
|
|
|
|
|
|
{{ $this_object = merge $this_object (dict "oneOf" $updated_items) }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
|
|
{{ return (dict
|
|
|
|
{{ return (dict
|
|
|
|