Spring Boot old versions of endpoint

16 Views Asked by At

I have 5 versions of some endpoint. Only V4 and V5 are used currently on the frontend side. What should I do with the V1, V2 and V3 versions? Should I remove them when are not used anywhere?

@PutMapping(consumes = "application/json", path = "/v1/announcement/{id:\\d+}")
@PutMapping(consumes = "application/json", path = "/v2/announcement/{id:\\d+}")
@PutMapping(consumes = "application/json", path = "/v3/announcement/{id:\\d+}")
@PutMapping(consumes = "application/json", path = "/v4/announcement/{id:\\d+}")
@PutMapping(consumes = "application/json", path = "/v5/announcement/{id:\\d+}")

The code is duplicated, almost the same for all versions (5 services)

What are the recommendations? Keep the old versions?

0

There are 0 best solutions below