let me describe my scenario, it's a little specific:I use dynamics 365 to manage my data, and I develop a series of API to update Dataverse. Now, I want to expose my API contracts, which are request and response. There is one question here that, I have some Enum fields in my request. If you are familiar with d365, you would know that we can get the Enums of columns from d365 by plugin it provides, and that's what we did. We make it in one common NuGet package which is used among all our services.When I package my contract as one NuGet, I have to claim that I depend on common package, which user will know this internal package, and dependency tree will be like below:
My question is how I should manage my dependency. I have two options:
- Keep current status. It means I will leak one more package to users and can't include everything in my package. User will depend on my package and depend on common package, and my package also depends on common package, which doesn't look like a good dependency tree for me. And I don't know if it's a good practice.
- Keep Enum in my contract. In this way, I need to maintain Enums in my package. Users have a better dependency tree, but I need to copy/paste from common package.
Which way is a better practice when exposing NuGet? Or is there some other better way? Thanks!