chore: fixup typegen for preview types (#17339)

Preview types override the json marshal behavior.
This commit is contained in:
Steven Masley
2025-04-11 13:21:46 -05:00
committed by GitHub
parent 7b0422b49b
commit 15584e69ef
3 changed files with 95 additions and 48 deletions

View File

@ -141,6 +141,14 @@ type DynamicParametersResponse struct {
// TODO: Workspace tags
}
// FriendlyDiagnostic is included to guarantee it is generated in the output
// types. This is used as the type override for `previewtypes.Diagnostic`.
type FriendlyDiagnostic = previewtypes.FriendlyDiagnostic
// NullHCLString is included to guarantee it is generated in the output
// types. This is used as the type override for `previewtypes.HCLString`.
type NullHCLString = previewtypes.NullHCLString
func (c *Client) TemplateVersionDynamicParameters(ctx context.Context, version uuid.UUID) (*wsjson.Stream[DynamicParametersResponse, DynamicParametersRequest], error) {
conn, err := c.Dial(ctx, fmt.Sprintf("/api/v2/templateversions/%s/dynamic-parameters", version), nil)
if err != nil {