goadesign / goa

🌟 Goa: Elevate Go API development! 🚀 Streamlined design, automatic code generation, and seamless HTTP/gRPC support. ✨
https://goa.design
MIT License
5.69k stars 560 forks source link

Generate view types for embedded user types #3569

Closed raphael closed 3 months ago

raphael commented 3 months ago

The previous commit was too aggressive and removed user types that are used by result types. These user types need corresponding types in the views package so that result types can be projected. This commit changes the check to be at the root of the type: if a type has no result type attribute recursively then it does not need to have corresponding view types. If a type contains result types then the type and all user type it uses are projected.