Aftermarket Adds AfterAPI to Keep Old Clients Working on a New API
Aftermarket has its second tool. AfterAPI, run as aftermarket adapt, is for the day a whole API gets replaced and a client still expects the old one. AfterPatch fixes one field or path at a time. AfterAPI has you write each old endpoint in terms of the new one: {id} moves from the old URL into the new, a short template rebuilds the old response from the new one, and status codes and error bodies get mapped back. A mapping applies fully or not at all, so anything it can’t translate safely passes through as sent and gets logged.
It was tested against an old client’s own suite of twelve strict checks. They pass against the old service, all fail against the new one, and all pass through AfterAPI. Take out any one of the five mappings and something fails again. A review before release found ten smaller problems, among them a path that could leak into the audit log and a dry run that could turn a slow answer into a 504. All were fixed, each with a test, 234 tests in all. Adapt added about 67 µs at the median to a lookup on a 2-CPU test machine. Binaries are out for Linux, macOS and Windows. The first note covers AfterPatch.