CenterEdge / Yardarm

OpenAPI 3 SDK Generator for C#
Apache License 2.0
46 stars 6 forks source link

When using HttpFactory registration, naming conflicts may occur #247

Closed brantburnett closed 3 weeks ago

brantburnett commented 1 month ago

When registering APIs on DI using Microsoft.Extensions.Http, i.e. AddXXXApis().AddApis() or AddXXXApis().AddApi<TInterface, TConcrete>(), the name of the interface is used to distinguish the service. This means an application consuming multiple different Yardarm SDKs that have the same interface name may get DI registration failures for trying to register them twice.

We should either automatically differentiate the API names more, or add an optional name parameter to pass into DI registration.