Migrate the uuid field in WireMock stub mapping files to id

MSAL

WireMock 3 serialized a stub mapping's identifier as both id and uuid, but 4.x dropped the redundant uuid field. A stub that carries only uuid still parses under 4.x, silently getting a randomly generated identifier instead, which breaks anything addressing the stub by id such as removeStub, editStub or PUT /__admin/mappings/{id}. Rename uuid to id, or drop it where an id is already present. Only stub mapping files are considered, meaning JSON below a mappings directory holding an object with a request or response member and a uuid holding a UUID.

org.openrewrite.java.testing.wiremock.MigrateStubMappingUuidToId
mod run . --recipe=org.openrewrite.java.testing.wiremock.MigrateStubMappingUuidToId

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.