Shared APIs should not expose the data models directly to clients. Data models should be mapped to client models and returned to clients.
Client models should be isolated from other code so they can be reused by a consuming client library.
The development team behind a shared API should post details about consuming the API to the API Gateway for discovery.
The development team should also create an isolated and abstract client to consume their shared APIs. This client library should be posted on the organization’s package manager (NuGet – Azure Artifacts) for use by other teams. Other teams should be able to easily install the NuGet package and invoke the API with minimum coding.
Shared client libraries should be developed with .NET Standard 2.x for maximum cross-platform usage.
Accessing shared or external/3rd party web services should be performing using the standard HttpClient. Do not use libraries such as RestSharp, etc.
To easily consume HttpClient functionality, connect to the NuGet feed in the Artifacts section of Azure DevOps and download the shared client library “Shared.HttpClientHelper”.