Open Jotschi opened 5 years ago
I think it should be somewhat easy to do. My idea would be, to specify the version you want to get when you load the client.
// Gets the client in the default Version
MeshRestClient defaultClient = adminClient();
// Gets the client in version 1
MeshRestClient clientV1 = adminClient("v1");
// Gets the client in version 2
MeshRestClient clientV2 = adminClient("v2");
Signature would need to change in here: https://github.com/gentics/mesh/blob/dev/plugin-api/src/main/java/com/gentics/mesh/plugin/MeshPlugin.java
The same should be added to the PluginContext, to get the User-Client in a certain version: https://github.com/gentics/mesh/blob/dev/plugin-api/src/main/java/com/gentics/mesh/plugin/PluginContext.java
The admin client will currently only be created with api/v1 - Some plugins may however want to use v2