Skip to content

Commit 1c36d75

Browse files
committed
docs: Drop deprecated JsonMapper adapter from migration plan
1 parent 5648af8 commit 1c36d75

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

docs/superpowers/specs/2026-05-13-type-mapper-request-handler-design.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ read/write per media type, and `RequestHandler` for handlers that receive a
2828
In scope:
2929

3030
- `TypeMapper` interface (read + write) and per-media-type registration on the builder.
31-
- Rename `JsonMapper` user-supplied `TypeMapper` for `application/json`; default form and text mappers wired automatically.
31+
- Delete `JsonMapper`; the user supplies a `TypeMapper` for `application/json` instead. Default form and text mappers wired automatically.
3232
- New `RequestHandler` interface; `handlers(...)` builder method changed to `Map<String, RequestHandler>` (breaking).
3333
- `Request` repurposed from a static-accessor utility into the per-request handle handlers receive. Read API mirrors today's `RequestContext`; adds a response gateway with one-shot and streaming terminals.
3434
- Internal `RequestContext` record and public `Request.CONTEXT` `ScopedValue` removed.
@@ -178,7 +178,7 @@ final class DispatchHandler implements HttpHandler {
178178

179179
This is a pre-1.0 library; breaking changes are acceptable.
180180

181-
- `JsonMapper` removed; replaced by `TypeMapper`. Builder method `jsonMapper(JsonMapper)` becomes `bodyMapper("application/json", TypeMapper)`.
181+
- `JsonMapper` removed; replaced by `TypeMapper`. Builder method `jsonMapper(JsonMapper)` becomes `bodyMapper("application/json", TypeMapper)`. No deprecated adapter is kept — the cutover happens in a single PR.
182182
- Builder method `handlers(Map<String, HttpHandler>)` becomes `handlers(Map<String, RequestHandler>)`.
183183
- Static accessors `Request.bytes()` / `Request.parsed()` / `Request.operationId()` / `Request.pathParams()` / `Request.current()` and the `Request.CONTEXT` `ScopedValue` are removed. Handlers read this data from the `Request` parameter.
184184
- The example launcher under `src/test/java/.../start/` is updated as part of this change.
@@ -199,8 +199,6 @@ Existing integration tests (`*IT.java`) exercise the full stack and will be upda
199199

200200
The implementation plan will sequence this as:
201201

202-
1. Introduce `TypeMapper`; convert form and text built-ins to implement it; convert `JsonMapper` to a deprecated adapter that wraps a `TypeMapper`.
202+
1. Introduce `TypeMapper`; convert form and text built-ins to implement it; delete `JsonMapper`; switch the builder to `bodyMapper(String, TypeMapper)`; rewire `RequestPreparationFilter` to use the registered mappers and drop the hardcoded media-type switch.
203203
2. Move form-coercion out of `FormUrlEncodedParser` into the validator path.
204-
3. Build the new `Request` class (read API + response gateway) and the internal `ScopedValue<Request>` handoff; keep the old static `Request` accessors alive temporarily.
205-
4. Introduce `RequestHandler`; update the builder (`bodyMapper(...)`, `handlers(Map<String,RequestHandler>)`); update example launcher and tests.
206-
5. Remove `JsonMapper`, the static `Request` accessors, and the `RequestContext` record.
204+
3. Build the new `Request` class (read API + response gateway), the internal `ScopedValue<Request>` handoff, and the `RequestHandler` interface; switch `handlers(...)` to `Map<String, RequestHandler>`; update example launcher and tests; delete the static `Request` accessors, the public `ScopedValue`, and the `RequestContext` record.

0 commit comments

Comments
 (0)