Yes exactly, I put everything in one class just for the simplicity. I actually faced this issue when started using the new hibernate validator 6. All annotations there implement @Target(
) and break model generation.