Merged
Conversation
…e IApiHealthApi and IApiInfoApi - Deleted IRootApi interface and its implementation. - Introduced IApiHealthApi and IApiInfoApi interfaces for health and info endpoints. - Updated FakeRootApi to FakeApiHealthApi and added FakeApiInfoApi for testing. - Modified ServersApiClient to use new API interfaces. - Updated ServiceCollectionExtensions to register new API clients. - Refactored health check logic to utilize IApiHealthApi. - Adjusted tests to reflect changes in API structure and functionality.
Contributor
Dependency ReviewThe following issues were found:
License Issuessrc/XtremeIdiots.Portal.Integrations.Servers.Api.V1/XtremeIdiots.Portal.Integrations.Servers.Api.V1.csproj
OpenSSF Scorecard
Scanned Files
|
Contributor
⛔ Superseded — A newer run has replaced this result.🏗️ Terraform Plan
✅ Validate — Passed ✅ Plan
📋 Resource Details
|
There was a problem hiding this comment.
Pull request overview
This PR refactors the Servers API client surface by replacing the legacy “root” endpoint abstraction with explicit health and info API interfaces, and updates DI + testing helpers accordingly. It also adjusts APIM policy to allow anonymous access to the health/info endpoints and updates the API’s dependency health check implementation.
Changes:
- Replace
IRootApiwithIApiHealthApiandIApiInfoApi(contracts + client implementations + version selectors). - Update DI registrations and all fake/testing clients to expose health/info instead of root.
- Update APIM product policy to exempt
/vX(.Y)/(health|info)from JWT validation; update repository health check to call the Repository API’s health endpoint via its client.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| terraform/azurerm_api_management_product_policy.tf | Exempts versioned /health and /info routes from JWT validation in APIM. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.V1/XtremeIdiots.Portal.Integrations.Servers.Api.V1.csproj | Bumps Repository API client package version. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.V1/Program.cs | Adds a minimal root endpoint mapping. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.V1/OpenApi/StripVersionPrefixTransformer.cs | Updates doc comment for version-prefix stripping behavior. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.V1/HealthChecks/RepositoryApiHealthCheck.cs | Uses Repository API client’s health endpoint instead of raw HttpClient + config. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.V1/ServiceCollectionExtensions.cs | Registers typed clients + version selectors for new health/info APIs. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.V1/ServersApiClient.cs | Replaces Root with ApiHealth/ApiInfo on the unified client. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.V1/IServersApiClient.cs | Updates contract to expose ApiHealth/ApiInfo instead of Root. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.V1/ApiVersionSelectors.cs | Replaces IVersionedRootApi with versioned health/info selector interfaces. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.V1/ApiVersionSelectorImplementations.cs | Adds version selector implementations for health/info. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.V1/Api/V1/RootApi.cs | Removes legacy Root API implementation. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.V1/Api/V1/ApiInfoApi.cs | Adds client implementation for /v1/info. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.V1/Api/V1/ApiHealthApi.cs | Adds client implementation for /v1/health. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.Tests.V1/UnitTest1.cs | Updates DI resolution tests for new versioned APIs. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.Testing/ServiceCollectionExtensions.cs | Updates fake DI wiring to register health/info fakes and selectors. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.Testing/FakeServersApiClient.cs | Updates fake unified client to delegate to health/info fakes. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.Testing/FakeApiInfoApi.cs | Adds an in-memory fake for IApiInfoApi. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.Testing/FakeApiHealthApi.cs | Renames/reworks fake root API into FakeApiHealthApi. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.Testing.Tests/ServiceCollectionExtensionsTests.cs | Updates fake DI tests for new health/info registrations. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.Testing.Tests/FakeServersApiClientTests.cs | Updates delegation tests for fake unified client. |
| src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.Testing.Tests/FakeApiHealthApiTests.cs | Renames/updates tests to cover the health fake. |
| src/XtremeIdiots.Portal.Integrations.Servers.Abstractions.V1/Models/ApiInfoDto.cs | Introduces DTO for /info responses. |
| src/XtremeIdiots.Portal.Integrations.Servers.Abstractions.V1/Interfaces/V1/IRootApi.cs | Removes legacy root interface. |
| src/XtremeIdiots.Portal.Integrations.Servers.Abstractions.V1/Interfaces/V1/IApiInfoApi.cs | Adds explicit API info contract. |
| src/XtremeIdiots.Portal.Integrations.Servers.Abstractions.V1/Interfaces/V1/IApiHealthApi.cs | Adds explicit API health contract. |
src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.V1/Api/V1/ApiInfoApi.cs
Outdated
Show resolved
Hide resolved
src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.V1/Api/V1/ApiHealthApi.cs
Outdated
Show resolved
Hide resolved
src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.Testing/FakeApiInfoApi.cs
Show resolved
Hide resolved
src/XtremeIdiots.Portal.Integrations.Servers.Abstractions.V1/Models/ApiInfoDto.cs
Outdated
Show resolved
Hide resolved
…; add unit tests for FakeApiInfoApi
Contributor
🏗️ Terraform Plan
✅ Validate — Passed ✅ Plan
📋 Resource Details
|
src/XtremeIdiots.Portal.Integrations.Servers.Abstractions.V1/Models/V1/ApiInfoDto.cs
Show resolved
Hide resolved
|
This was referenced Feb 22, 2026
This was referenced Mar 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This pull request introduces two new API interfaces—
IApiHealthApiandIApiInfoApi—and removes the legacyIRootApiinterface and its related implementations. The changes modernize the API client by providing explicit health and info endpoints, updating the fake/test clients, and ensuring proper dependency injection registration. The most important changes are grouped below by theme.API Interface Changes:
IApiHealthApiandIApiInfoApifor health check and API info functionality, replacing the previous root endpoint abstraction. (src/XtremeIdiots.Portal.Integrations.Servers.Abstractions.V1/Interfaces/V1/IApiHealthApi.cs,src/XtremeIdiots.Portal.Integrations.Servers.Abstractions.V1/Interfaces/V1/IApiInfoApi.cs) [1] [2]IRootApiinterface and its implementation, deprecating the root endpoint in favor of explicit health/info endpoints. (src/XtremeIdiots.Portal.Integrations.Servers.Abstractions.V1/Interfaces/V1/IRootApi.cs,src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.V1/Api/V1/RootApi.cs) [1] [2]API Client Implementation:
ApiHealthApiandApiInfoApiin the client, providing health check and info retrieval functionality. (src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.V1/Api/V1/ApiHealthApi.cs,src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.V1/Api/V1/ApiInfoApi.cs) [1] [2]ApiInfoDtomodel for API info responses. (src/XtremeIdiots.Portal.Integrations.Servers.Abstractions.V1/Models/ApiInfoDto.cs)Testing and Dependency Injection Updates:
FakeApiHealthApiandFakeApiInfoApiinstead ofFakeRootApi, and ensured all new interfaces are registered and tested. (src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.Testing/FakeApiHealthApi.cs,src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.Testing/FakeApiInfoApi.cs,src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.Testing/FakeServersApiClient.cs,src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.Testing.Tests/FakeApiHealthApiTests.cs,src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.Testing.Tests/ServiceCollectionExtensionsTests.cs,src/XtremeIdiots.Portal.Integrations.Servers.Api.Client.Tests.V1/UnitTest1.cs) [1] [2] [3] [4] [5] [6]These changes collectively update the API abstraction to be more explicit and robust, improve testability, and ensure proper dependency injection for the new endpoints.