github.com/percona-lab/go-swagger@v0.19.0/generator/templates/model.gotmpl (about)

     1  {{ template "header" . }}
     2  
     3  {{ if .IncludeModel }}
     4    {{- if eq .Name "ApiResponse" }}// APIResponse is the response to an API call.
     5    {{- else }}
     6      {{- if .IsExported -}}
     7        // {{ pascalize .Name }} {{ template "docstring" . }}
     8        {{- if not .IsBaseType }}
     9  // swagger:model {{ .Name }}
    10        {{- else }}
    11  // swagger:discriminator {{ .Name }} {{ .DiscriminatorField }}
    12        {{- end }}
    13      {{- end }}
    14  {{- end }}
    15  {{- end }}
    16  {{ template "schema" . }}
    17  
    18  {{ range .ExtraSchemas }}
    19    {{- if .IsExported }}
    20  {{ if .IncludeModel }}// {{ pascalize .Name }} {{ template "docstring" . }}
    21    {{- if not .IsBaseType }}
    22  // swagger:model {{ .Name }}
    23    {{- else }}
    24  // swagger:discriminator {{ .Name }} {{ .DiscriminatorField }}
    25    {{- end }}
    26  {{- end}}
    27  {{- end }}
    28  {{ template "schema" . }}
    29  {{ end }}