Include interfaces from Azure.Core in .NET APIView reviews
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 143
Description
We ran across this because the `RouterJob` type in [this APIView](https://apiview.dev/Assemblies/Review/8be7e0eb29c042cfa7415987cab06a9d#Azure.Communication.JobRouter.Models.RouterJob) implements the `IModelJsonSerializable` interface in Azure.Core, but it isn't shown in the APIView.
@JoshLove-msft suggested the following fix:
> The issue seems to be related to the fact that we [check the accessibility for interfaces](https://github.com/Azure/azure-sdk-tools/blob/main/src/dotnet/APIView/APIView/Languages/CodeFileBuilder.cs#L363-L365), but because the Core.dll doesn't get included in the nupkg (and API View doesn't handle processing multiple dlls in a single view anyway), there is an error in the reflection APIs that cause the accessibility to be NotApplicable. I think the simple fix would be to just update the IsAccessible check to also include NotApplicable for types included from the Core.dll.
For a repro, the branch I built the APIView from is this one: https://github.com/annelo-msft/azure-sdk-for-net/tree/core-prove-patch-approach, and a nuget package to test with is [Azure.Communication.JobRouter.1.0.3-alpha.20230823.1.zip](https://github.com/Azure/azure-sdk-tools/files/12423791/Azure.Communication.JobRouter.1.0.3-alpha.20230823.1.zip). (Note: change `.zip` extension to `.nupkg`.)
Contributor guide
Assessment
This issue has not been assessed yet.