You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generated constructor for a Conjure-defined object currently has its arguments ordered by optional vs. non-optional, followed by alphabetical order. This is defined here.
This seems to be out of sync with generated Java clients for Conjure objects, which have an .of() method whose argument order matches the order in the original Conjure YML definition. Is there a strong reason for this difference between the Java and Python clients?
The text was updated successfully, but these errors were encountered:
I would not compare the .of() factory method of some conjure-java beans with the constructor of the conjure-python "object" classes.
In Java, the .of() method is simply a convenience wrapper around the builder for beans with small number of arguments. In Python, the constructor is the equivalent of the Java builder and is the only way to create these objects.
I do agree though that the current ordering is not ideal. Long term we want to major rev the code gen and make all constructor and endpoint arguments kwargs for robustness (prevent binary breaks caused by backwards compatible API changes) and clarity
@ferozco : Is this long-term change (making all constructor and endpoint arguments kwargs for robustness) still on your roadmap? I think that there is an argument to be made that this major rev can also come with dropping Python2 support (Python2 was sunset more than a year ago), which would make the implementation of enforcing mandatory keyword args a great deal simpler.
Hey @AaronJRubin I've rolled off of the team and I don't believe there is any active development on Conjure-python right now. @carterkozak or @jkozlowski are the best people to ask
The generated constructor for a Conjure-defined object currently has its arguments ordered by optional vs. non-optional, followed by alphabetical order. This is defined here.
This seems to be out of sync with generated Java clients for Conjure objects, which have an
.of()
method whose argument order matches the order in the original Conjure YML definition. Is there a strong reason for this difference between the Java and Python clients?The text was updated successfully, but these errors were encountered: