| 646 | } |
| 647 | |
| 648 | func 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 | |
| 660 | func newRT(id string, att *expr.AttributeExpr) *expr.AttributeExpr { |
| 661 | return &expr.AttributeExpr{ |