You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename the public API surface to use OpenAPI's own vocabulary wherever a type models something OpenAPI describes, while deliberately keeping DevView-specific names for types that model DevView's own runtime mocking behaviour (which OpenAPI has no concept of). Doing this now is free — the API already breaks in 0.2.0 — whereas doing it in a later release would be a second breaking change.
Rule
A type takes the OpenAPI term when it models something the spec describes (a document, an operation, a server). It keeps its DevView name when it models DevView's own mocking behaviour — matching a request, holding a served response, persisting on/off state. Those concepts have no OpenAPI counterpart, and renaming them would incorrectly imply an equivalence.
a runtime mock artifact: it exists only when a mock is actually served on an intercepted request. Sourced from an OpenAPI Example at config time, but it is not one — an OpenAPI Example is documentation; a MockResponse is a served response. A live (unmocked) request produces neither a MockResponse nor anything OpenAPI-shaped.
MockMatch
kept as-is, .endpointId → .operationId
matching an incoming request to a configured operation is DevView's own concept; OpenAPI has no term for it
Do not rename MockResponse → e.g. ResponseExample or MockMatch → OperationMatch — this was explicitly considered and rejected (see "Deliberately skipped" section of the original audit/plan). If you find yourself wanting to make that rename while doing this issue, stop and re-read the rule above; the two concepts are genuinely different.
Since 0.2.0 is already a breaking release (per the epic), this is the only point where the rename is "free" — bundling it into a later release means a second binary-incompatible bump just for names.
Acceptance criteria
Every rename in the table above is applied consistently across devview-networkmock-core, devview-networkmock, and devview-networkmock-ktor.
MockResponse and MockMatch are explicitly not renamed — call this out in the PR description so reviewers know it's deliberate, not an oversight.
KDoc is updated everywhere the old names appear (grep for EndpointConfig, ApiGroupConfig, EndpointKey, GroupEnvironmentUiModel, EndpointUiModel, EndpointDescriptor across all three modules' commonMain).
api/api.txt regenerated for all three affected modules.
konsist architecture tests still pass (dependency rules are about module boundaries, not type names, but double check nothing hardcodes an old name).
Files likely touched
Every file under the three networkmock modules that references any renamed type — this is a wide, mechanical diff. Suggested approach: do the rename with IDE refactoring tools (rename symbol) rather than manual find-replace, to catch KDoc [Link] references automatically where possible.
Part of #72
Depends on #1, #2.
Summary
Rename the public API surface to use OpenAPI's own vocabulary wherever a type models something OpenAPI describes, while deliberately keeping DevView-specific names for types that model DevView's own runtime mocking behaviour (which OpenAPI has no concept of). Doing this now is free — the API already breaks in 0.2.0 — whereas doing it in a later release would be a second breaking change.
Rule
Rename table
ApiGroupConfigApiSpecEnvironmentConfigApiSpec.servers: List<String>servers[].urlEndpointConfigOperationEndpointOverride,EndpointDefinition,effectiveEndpointsEndpointKey(groupId, environmentId, endpointId)OperationKey(specId, operationId)operationIdis the exact field name integrators type in their specEndpointDescriptorOperationDescriptorEndpointConfig.queryParamsOperation.queryParametersparameterswithin: queryEndpointMockStateOperationMockStateMockConfiguration.apiGroupsMockConfiguration.specsApiSpecGroupEnvironmentUiModelApiSpecUiModelEndpointUiModelOperationUiModelNetworkMock(configPath: String)NetworkMock(specPaths: List<String>)MockResponseMockResponseis a served response. A live (unmocked) request produces neither aMockResponsenor anything OpenAPI-shaped.MockMatch.endpointId→.operationIdNetworkMockState,MockConfigRepository,MockStateRepositoryDo not rename
MockResponse→ e.g.ResponseExampleorMockMatch→OperationMatch— this was explicitly considered and rejected (see "Deliberately skipped" section of the original audit/plan). If you find yourself wanting to make that rename while doing this issue, stop and re-read the rule above; the two concepts are genuinely different.Why do this now, in its own PR
Acceptance criteria
devview-networkmock-core,devview-networkmock, anddevview-networkmock-ktor.MockResponseandMockMatchare explicitly not renamed — call this out in the PR description so reviewers know it's deliberate, not an oversight.EndpointConfig,ApiGroupConfig,EndpointKey,GroupEnvironmentUiModel,EndpointUiModel,EndpointDescriptoracross all three modules'commonMain).api/api.txtregenerated for all three affected modules.konsistarchitecture tests still pass (dependency rules are about module boundaries, not type names, but double check nothing hardcodes an old name).Files likely touched
Every file under the three networkmock modules that references any renamed type — this is a wide, mechanical diff. Suggested approach: do the rename with IDE refactoring tools (rename symbol) rather than manual find-replace, to catch KDoc
[Link]references automatically where possible.