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 to internal.
- 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
MockHttpClientCall directly (check devview-networkmock-ktor/src/androidHostTest/... and sample/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
Files likely touched
devview-networkmock-ktor/src/commonMain/kotlin/com/worldline/devview/networkmock/ktor/plugin/NetworkMockPlugin.kt
devview-networkmock-ktor/api/api.txt
Summary
MockHttpClientCallis a public class purely because Ktor'sHttpClientCall(client)base constructor requires it to be instantiable from the plugin's install code — it should beinternal. 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 declaredpublic 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. ItsrawContentoverride 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
MockHttpClientCall's visibility tointernal.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.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.MockHttpClientCalldirectly.Files likely touched
devview-networkmock-ktor/src/commonMain/kotlin/com/worldline/devview/networkmock/ktor/plugin/NetworkMockPlugin.ktdevview-networkmock-ktor/api/api.txt