github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/generator/templates/structfield.gotmpl (about) 1 {{ define "structfield" }} 2 {{- if not $.IsBaseType -}} 3 // {{ template "docstring" . }} 4 {{- template "propertyValidationDocString" .}} 5 {{- end}} 6 {{ pascalize .Name}} {{ template "schemaType" . }} {{ .PrintTags }} 7 {{ end }} 8 9 {{- define "tuplefield" }} 10 {{- if not $.IsBaseType -}} 11 // {{ template "docstring" . }} 12 {{- template "propertyValidationDocString" .}} 13 {{ end }} 14 {{- pascalize .Name}} {{ template "schemaType" . }} `json:"-" 15 {{- if .CustomTag }} {{ .CustomTag }}{{ end }}` // custom serializer 16 {{ end }} 17 18 {{- define "structfieldIface" }} 19 {{- if not $.IsBaseType -}} 20 // {{ template "docstring" . }} 21 {{- template "propertyValidationDocString" .}} 22 {{- end }} 23 {{ pascalize .Name}}() {{ template "schemaType" . }} 24 Set{{ pascalize .Name}}({{ template "schemaType" . }}) 25 {{ end }} 26 {{ define "tuplefieldIface" }} 27 {{- if not $.IsBaseType -}} 28 // {{ template "docstring" . }} 29 {{- template "propertyValidationDocString" . }} 30 {{ end }} 31 {{- pascalize .Name}}() {{ template "schemaType" . }} 32 Set{{ pascalize .Name}}({{ template "schemaType" . }}) 33 {{ end }} 34 35 {{- define "privstructfield" }} 36 {{- camelize .Name}}Field {{ template "schemaType" . }} 37 {{ end }} 38 39 {{- define "privtuplefield" }} 40 {{- camelize .Name}}Field {{ template "schemaType" . }} 41 {{ end }}