-
Notifications
You must be signed in to change notification settings - Fork 0
add v2 routes #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add v2 routes #27
Conversation
| import io.tiledb.cloud.rest_api.v1.ApiException; | ||
| import io.tiledb.cloud.rest_api.v1.api.GroupsApi; | ||
| import io.tiledb.cloud.rest_api.v1.api.ArrayApi; | ||
| import io.tiledb.cloud.rest_api.v1.model.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be a breaking change. Not sure if you want that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be a breaking change yes, necessary in my opinion to include the new code. Otherwise the packaging will be unclear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I'm leaving it to others to make the decision on the breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the comment!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per discussion, we're going to alias the v1 elements and provide a deprecation pathway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class aliases are not available in Java but I did the following. I created the v1 directory and also left the v1 files in their previous directory. So I pretty match did a copy-paste and we ended up with multiple duplicates. In the files that are in the unwanted directory I added a deprecation warning. These files will be removed in our next release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deprecation warning is:
**
* @deprecated This class is now moved to io.tiledb.cloud.rest_api.v1.api
*/
@Deprecated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Without an aliasing mechanism (java 🙃), this will be an all-or-nothing change: users will need to update all uses at once, because the v1.* types will be semantically distinct even if they are nominally identical. So, if at all possible, we should wait two libTileDB releases before removing the old signatures in order to follow our general deprecation policy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good!
I used the openapi-v2.yaml to generate the code for the v2 routes. I then restructured the packages to include
v1andv2.This is the beginning. In following PRs I will also include the v2 routes in our wrapping classes and examples.