Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardfeng-db committed Oct 14, 2024
1 parent 45ff668 commit 2b7bc35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .codegen/model.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type {{.PascalName}} struct {
{{end}}

{{- define "field-tag" -}}
{{if .IsJson}}tfsdk:"{{if and (ne .Entity.Terraform nil) (ne .Entity.Terraform.Alias "") }}{{.Entity.Terraform.Alias}}{{else}}{{.Name}}{{end}}" tf:"{{- $first := true -}}{{- if not .Required -}}{{- if not $first -}},{{end}}optional{{- $first = false -}}{{- end -}}{{- if .Entity.IsObject -}}{{- if not $first -}},{{end}}object{{- $first = false -}}{{- end -}}"{{else}}tfsdk:"-"{{end -}}
{{if .IsJson}}tfsdk:"{{if and (ne .Entity.Terraform nil) (ne .Entity.Terraform.Alias "") }}{{.Entity.Terraform.Alias}}{{else}}{{.Name}}{{end}}" tf:"{{.TfOptions}}"{{else}}tfsdk:"-"{{end -}}
{{- end -}}

{{- define "type" -}}
Expand Down

0 comments on commit 2b7bc35

Please sign in to comment.