rob05c commented on issue #2560: TO Go cachegroups, DS regexes, servers, and staticdnsentries don't validate their type URL: https://github.com/apache/trafficcontrol/issues/2560#issuecomment-406081707 >this strategy of enforcing the type validation How does this enforce it? It seems like a lot of structs won't have types, and for ones that do, someone could just omit the interfaces. >Entities that don't use the shared handlers could import the same code that the shared handler would use to do the validation. If you do this, please consider non-CRUD endpoints first. The way you phrase it suggests CRUD is a priority, and other functions an afterthought. CRUD is a minority, and most of the difficult endpoints aren't CRUD. It's been a major pain-point in the past, writing our many and unusual endpoints, when every utility function (tenancy, validate, etc) is written around the "shared_handlers" abstractions, and can't easily be used without major workarounds or refactoring. Please expose simple functions, without interfaces/abstractions/typecasts/reflection, that are easy to use and don't require a steep learning curve. I've been the one rewriting most of the TO endpoints, and most of the difficult ones. Every time we add more rigid framework stuff, it makes my life harder :(
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
