github.com/6543-forks/go-swagger@v0.26.0/generator/templates/validation/structfield.gotmpl (about)

     1  {{ define "propertyValidationDocString" }}
     2  
     3  {{- if .Required }}
     4  // Required: true
     5  {{- end }}
     6  
     7  {{- if .ReadOnly }}
     8  // Read Only: true
     9  {{- end }}
    10  
    11  {{- if .Maximum }}
    12  // Maximum: {{ if .ExclusiveMaximum }}< {{ end }}{{ .Maximum }}
    13  {{- end }}
    14  
    15  {{- if .Minimum }}
    16  // Minimum: {{ if .ExclusiveMinimum }}> {{ end }}{{ .Minimum }}
    17  {{- end }}
    18  
    19  {{- if .MultipleOf }}
    20  // Multiple Of: {{ .MultipleOf }}
    21  {{- end }}
    22  
    23  {{- if .MaxLength }}
    24  // Max Length: {{ .MaxLength }}
    25  {{- end }}
    26  
    27  {{- if .MinLength }}
    28  // Min Length: {{ .MinLength }}
    29  {{- end }}
    30  
    31  {{- if .Pattern }}
    32  // Pattern: {{ .Pattern }}
    33  {{- end }}
    34  
    35  {{- if .MaxItems }}
    36  // Max Items: {{ .MaxItems }}
    37  {{- end }}
    38  
    39  {{- if .MinItems }}
    40  // Min Items: {{ .MinItems }}
    41  {{- end }}
    42  
    43  {{- if .UniqueItems }}
    44  // Unique: true
    45  {{- end }}
    46  
    47  {{- if .IsCustomFormatter }}
    48  // Format: {{ .SwaggerFormat }}
    49  {{- end }}
    50  
    51  {{- if .Enum }}
    52  // Enum: {{ printf "%v" .Enum }}
    53  {{- end }}
    54  {{- end}}