Skip to content

Commit b9f5e90

Browse files
authored
[Internal] Change name with the aliases in codegen template (#3936)
## Changes <!-- Summary of your changes that are easy to understand --> Change name with the aliases in codegen template. ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [ ] `make test` run locally - [ ] relevant change in `docs/` folder - [ ] covered with integration tests in `internal/acceptance` - [ ] relevant acceptance tests are passing - [ ] using Go SDK
1 parent 8ed75c2 commit b9f5e90

File tree

17 files changed

+2478
-738
lines changed

17 files changed

+2478
-738
lines changed

.codegen/_openapi_sha

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7437dabb9dadee402c1fc060df4c1ce8cc5369f0
1+
3eae49b444cac5a0118a3503e5b7ecef7f96527a

.codegen/model.go.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type {{.PascalName}} struct {
3131
{{end}}
3232

3333
{{- define "field-tag" -}}
34-
{{if .IsJson}}tfsdk:"{{.Name}}" tf:"{{if not .Required}}optional{{end}}"{{else}}tfsdk:"-"{{end -}}
34+
{{if .IsJson}}tfsdk:"{{if and (ne .Entity.Terraform nil) (ne .Entity.Terraform.Alias "") }}{{.Entity.Terraform.Alias}}{{else}}{{.Name}}{{end}}" tf:"{{if not .Required}}optional{{end}}"{{else}}tfsdk:"-"{{end -}}
3535
{{- end -}}
3636

3737
{{- define "type" -}}

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
internal/service/apps_tf/model.go linguist-generated=true
12
internal/service/billing_tf/model.go linguist-generated=true
23
internal/service/catalog_tf/model.go linguist-generated=true
34
internal/service/compute_tf/model.go linguist-generated=true

internal/service/apps_tf/model.go

Lines changed: 257 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)