Repository navigation
Description
Summary
MockHttpClientCall is a public class purely because Ktor's HttpClientCall(client) base constructor requires it to be instantiable from the plugin's install code — it should be internal. This is independent of the OpenAPI migration (tracked in the epic, #72) and can be picked up any time. Good first issue: small, self-contained, mechanical.
Current state
MockHttpClientCall (devview-networkmock-ktor/src/commonMain/kotlin/com/worldline/devview/networkmock/ktor/plugin/NetworkMockPlugin.kt:356-408) is declared public class MockHttpClientCall(client: HttpClient) : HttpClientCall(client). It's part of the tracked public API surface (devview-networkmock-ktor/api/api.txt), but nothing about it is meant to be integrator-facing — it's an internal implementation detail of how the plugin fabricates a synthetic response. Its rawContent override is annotated @InternalAPI (:390-393), meaning it already depends on a Ktor API that isn't stable — being public compounds that risk, since any breaking change to Ktor's internals here would be a breaking change to this library's public API too, for a type integrators have no legitimate reason to construct themselves.
What to build
- Change
MockHttpClientCall's visibility tointernal. - Verify this compiles —
createMockHttpClientCall(:322-346), the only caller, is a private top-level function in the same file, so this should be a clean visibility narrowing with no call-site changes needed elsewhere. - Confirm no test or sample code constructs
MockHttpClientCalldirectly (checkdevview-networkmock-ktor/src/androidHostTest/...andsample/network/...) — if something does, that usage needs to move to a public entry point (or the test needs restructuring to not require direct construction).
Acceptance criteria
-
MockHttpClientCallisinternal, notpublic. -
devview-networkmock-ktor/api/api.txtis regenerated and no longer listsMockHttpClientCall. - All existing tests still pass without needing to construct
MockHttpClientCalldirectly.
Files likely touched
devview-networkmock-ktor/src/commonMain/kotlin/com/worldline/devview/networkmock/ktor/plugin/NetworkMockPlugin.ktdevview-networkmock-ktor/api/api.txt
Activity
github-actions commentedon Aug 20, 2026
This issue is stale because it has been open for 21 days with no activity.
github-actions commentedon Sep 15, 2026
This issue is stale because it has been open for 21 days with no activity.
github-actions commentedon Sep 22, 2026
This issue was closed because it has been inactive for 7 days since being marked as stale.
🔒 Make MockHttpClientCall internal
🔒 Make MockHttpClientCall internal