Back in 2005-10 era, we used to use stuff like XMLBeans to define an entire, consistent domain model include type constraints (enums, valid integer ranges, regex) in XML and generate code at build-time that we never had to look at. The XSD made sure it would be valid. So many years into the future and things are just worse than that.