Hello Rob,
the client would be informed about newer versions,
and a new version would be the result of communication about....
- ... desired new parts in the API that are still missing
- .... resulting of refactoring from our side, where the api could be
optimized etc.
The version is encoded in the Path of the Controller and the client can
choose which version he wants to call.
(old versions will be removed after some releases)
*ProductControllerV1*
@Path("/api/v1/products")
public class ProductControllerV1 {
@Path("/")
public CreateProductResponseV1 create(CreateProductRequestV1
createProductRequest) throws ValidationException {
return productManager.create(new RequestContext(1, 1),
createProductRequest);
}
}
---
The ProductDaoV1 was only an example how such a versioned Dao could look
like.
A ProductDaoV2 could look exactly the same like ProductDaoV1 with only
minor changes, like:
- a new field: PRODUCT.NAME that was missing in V1 and is now desired by
the client.
- a removed field
- a renamed field
- a changed datatype
- ...
It is a hassle for the programmer who needs to copy all the V1 code to V2
(all DAOs, DTOs, Repositories, Controllers, ... that are in V1),
and rename all those to V2 and then only change some small parts, but at
the same time there is the desire to be able
to have older versions still available, while migrating to a new version
(clients need to be convinced to migrate)
[email protected] schrieb am Sonntag, 13. Oktober 2024 um 18:05:40 UTC:
> What does ProductDaoV2 look like?
>
> I assume the client knows which version it wants?
>
--
You received this message because you are subscribed to the Google Groups "jOOQ
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jooq-user/3d7ad796-1050-4c00-8b6f-c87d05e62d2dn%40googlegroups.com.