MCPcopy Create free account
hub / github.com/goadesign/goa / hasMinMaxValidation

Function hasMinMaxValidation

expr/example.go:145–153  ·  view source on GitHub ↗
(a *AttributeExpr)

Source from the content-addressed store, hash-verified

143}
144
145func hasMinMaxValidation(a *AttributeExpr) bool {
146 if a.Validation == nil {
147 return false
148 }
149 return a.Validation.ExclusiveMinimum != nil ||
150 a.Validation.Minimum != nil ||
151 a.Validation.ExclusiveMaximum != nil ||
152 a.Validation.Maximum != nil
153}
154
155// byLength generates a random size array of examples based on what's given.
156func byLength(a *AttributeExpr, r *ExampleGenerator) any {

Callers 3

ExampleMethod · 0.85
byMinMaxFunction · 0.85
checkMinMaxValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected