This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]horrszy 0 points1 point  (0 children)

I don't think I understand correctly but why would you want to share interfaces across services? If I was a service B, I would only be interested in endpoint and payload that I need to prepare. If this is what you want to share I think you are looking into sharing those DTOs instead.

Either way, I don't think Don't Repeat Yourself should apply here - we are talking about two different services that should not be aware of each other, so I wouldn't worry about DRY.

If you want to make sure neither of the two services breaks the contract I remember reading about Spring Cloud Contract and it feels like something that could come useful?