fix: promote variable defaultValue to a named oneOf component

The list variable defaultValue was an inline string | []string oneOf,
which downstream codegen can't canonicalize: tfplugingen-openapi rejects
the inline scalar-or-array multi-type, and oapi-codegen has no named type
to attach the union's Marshal/UnmarshalJSON to.

Shape the vendored variable.DefaultValue as the named VariableDefaultValue
oneOf via a reflector InterceptSchema hook and let defaultValue $ref it,
instead of overriding the property inline. Regenerate the OpenAPI spec and
frontend client accordingly.
This commit is contained in:
grandwizard28
2026-06-26 11:52:21 +05:30
parent 85902343bc
commit 94de803e7f
5 changed files with 47 additions and 32 deletions

View File

@@ -2971,11 +2971,7 @@ components:
customAllValue:
type: string
defaultValue:
oneOf:
- type: string
- items:
type: string
type: array
$ref: '#/components/schemas/VariableDefaultValue'
display:
$ref: '#/components/schemas/DashboardtypesDisplay'
name:
@@ -7895,7 +7891,11 @@ components:
- id
type: object
VariableDefaultValue:
type: object
oneOf:
- type: string
- items:
type: string
type: array
ZeustypesGettableHost:
properties:
hosts: