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

Function initMinLengthValidation

http/codegen/openapi/v2/builder.go:781–794  ·  view source on GitHub ↗
(def any, isArray bool, minLength *int)

Source from the content-addressed store, hash-verified

779}
780
781func initMinLengthValidation(def any, isArray bool, minLength *int) {
782 switch actual := def.(type) {
783 case *Parameter:
784 if isArray {
785 actual.MinItems = minLength
786 } else {
787 actual.MinLength = minLength
788 }
789 case *Header:
790 actual.MinLength = minLength
791 case *Items:
792 actual.MinLength = minLength
793 }
794}
795
796func initMaxLengthValidation(def any, isArray bool, maxLength *int) {
797 switch actual := def.(type) {

Callers 1

initValidationsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected