github.com/rzurga/go-swagger@v0.28.1-0.20211109195225-5d1f453ffa3a/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 .MinProperties }} 44 // Min Properties: {{ .MinProperties }} 45 {{- end }} 46 47 {{- if .MaxProperties }} 48 // Max Properties: {{ .MaxProperties }} 49 {{- end }} 50 51 {{- if .UniqueItems }} 52 // Unique: true 53 {{- end }} 54 55 {{- if .IsCustomFormatter }} 56 // Format: {{ .SwaggerFormat }} 57 {{- end }} 58 59 {{- if .Enum }} 60 // Enum: {{ printf "%v" .Enum }} 61 {{- end }} 62 {{- end}}