I hope my question is not too broad.
Our application has an Angular frontend and a Java backend and we need both frontend and backened validation. At the moment, we manually code validators in Typescript and Java that basically do the same thing. Since that is not only tedious but also error-prone, we would like to define once (maybe in a JSON file) which input fields have which constraints and ideally use a piece of software that auto-generates Java and Typescript code based on that definition.
My question is: are there any open-source/commercial software solutions that take care of this? It seems like a common enough problem, but I haven't come across a proper solution yet. JSON schema seemed promising and since we're using swagger anyway, I'd hoped that swagger-codegen would automatically take the supported JSON-schema keywords as constraints into account, but I haven't figured out how it works. When I generate Angular code, constraints such as 'minimum' and 'maximum' are completely ignored, and when I generate Java SpringBoot code, they only show up as annotations.