github.com/AngusLu/go-swagger@v0.28.0/generator/templates/schematype.gotmpl (about) 1 {{ define "schemaType" }} 2 {{- if and (or (gt (len .AllOf) 0) .IsAnonymous) ( not .IsMap) }} 3 {{- template "schemaBody" . }} 4 {{- else }} 5 {{- if and (not .IsMap) .IsNullable (not .IsSuperAlias) }}*{{ end }} 6 {{- if .IsSuperAlias }} = {{ end }} 7 {{- .GoType }} 8 {{- end}} 9 {{- end }} 10 11 {{ define "dereffedSchemaType" }} 12 {{- if and (or (gt (len .AllOf) 0) .IsAnonymous) ( not .IsMap) }} 13 {{- template "schemaBody" . }} 14 {{- else }} 15 {{- .GoType }} 16 {{- end}} 17 {{- end }} 18 19 {{ define "typeSchemaType" }} 20 {{- if and (or (gt (len .AllOf) 0) .IsAnonymous) ( not .IsMap) ( not .IsSuperAlias ) }} 21 {{- template "schemaBody" . }} 22 {{- else if and .IsSubType ( not .IsSuperAlias ) }} 23 {{- template "subTypeBody" . }} 24 {{- else }} 25 {{- if and (not .IsMap) .IsNullable (not .IsSuperAlias) }}*{{ end }} 26 {{- if .IsSuperAlias }} = {{ end }} 27 {{- if .AliasedType }}{{ .AliasedType }}{{ else }}{{ .GoType }}{{ end }} 28 {{- end}} 29 {{- end }}