If you're needing to share code for domain objects between microservices something has gone badly wrong.