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

Function newObj2Meta

http/codegen/openapi/v3/types_test.go:648–658  ·  view source on GitHub ↗
(n, o string, t, u expr.DataType, l, m expr.MetaExpr, reqs ...string)

Source from the content-addressed store, hash-verified

646}
647
648func newObj2Meta(n, o string, t, u expr.DataType, l, m expr.MetaExpr, reqs ...string) *expr.AttributeExpr {
649 attr := &expr.AttributeExpr{
650 Type: &expr.Object{
651 {Name: n, Attribute: &expr.AttributeExpr{Type: t, Meta: l}},
652 {Name: o, Attribute: &expr.AttributeExpr{Type: u, Meta: m}},
653 },
654 Validation: &expr.ValidationExpr{},
655 }
656 attr.Validation.Required = append(attr.Validation.Required, reqs...)
657 return attr
658}
659
660func newRT(id string, att *expr.AttributeExpr) *expr.AttributeExpr {
661 return &expr.AttributeExpr{

Callers 1

TestHashAttributeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected