Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
per-operation mock selections are untouched. (`devview-networkmock-core`,
`devview-networkmock`, #90)

### Changed
- **Breaking:** `MockHttpClientCall` is now `internal` instead of `public` — it was only public
because Ktor's `HttpClientCall(client)` base constructor required it to be instantiable from
the plugin's install code, not because integrators have a legitimate reason to construct it
themselves. Its `rawContent` override already depends on the `@InternalAPI`-annotated Ktor
API, so staying public compounded that instability onto this library's own tracked surface.
(`devview-networkmock-ktor`, #89)

### Fixed
- NetworkMock: replaced ~35 unconditional `println` calls in `MockConfigRepository` and
`NetworkMockPlugin` with gated [Kermit](https://github.com/touchlab/Kermit) logging
Expand Down
1 change: 0 additions & 1 deletion devview-networkmock-ktor/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ val client = HttpClient(OkHttp) {

- `NetworkMockPlugin` — the `HttpClientPlugin<NetworkMockConfig, NetworkMockPluginConfig>` singleton (`NetworkMockPlugin.kt`)
- `NetworkMockConfig` — DSL receiver; exposes `mockRepository` and `stateRepository` as nullable vars, plus `random: Random` (defaults to `Random.Default`) used for the `x-devview.failureRate` roll — override in tests to pin the outcome (`NetworkMockConfig.kt`)
- `MockHttpClientCall` — public subclass of `HttpClientCall` that wraps synthetic request/response data without touching the network (`NetworkMockPlugin.kt`)

## Interception Flow

Expand Down
5 changes: 0 additions & 5 deletions devview-networkmock-ktor/api/api.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
// Signature format: 4.0
package com.worldline.devview.networkmock.ktor.plugin {

public final class MockHttpClientCall extends io.ktor.client.call.HttpClientCall {
ctor public MockHttpClientCall(io.ktor.client.HttpClient client);
ctor public MockHttpClientCall(io.ktor.client.HttpClient client, io.ktor.client.request.HttpRequestData mockRequestData, io.ktor.client.request.HttpResponseData mockResponseData);
}

public final class NetworkMockConfig {
ctor public NetworkMockConfig();
method @InaccessibleFromKotlin public com.worldline.devview.networkmock.core.repository.MockConfigRepository? getMockRepository();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,8 @@ private fun createMockHttpClientCall(
* a synthetic response. Both [request] and [response] are set immediately in
* the secondary constructor so the call is fully usable upon creation.
*/
public class MockHttpClientCall(client: HttpClient) : HttpClientCall(client) {
public constructor(
internal class MockHttpClientCall(client: HttpClient) : HttpClientCall(client) {
constructor(
client: HttpClient,
mockRequestData: HttpRequestData,
mockResponseData: HttpResponseData
Expand Down
Loading