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
We have codegen(2.2.2) to generate java client code for our tests. In a recent change, an optional query parameter was added to one of the APIs with default value specified.
This shouldn't cause any issue as its optional and also has default value, so it does support backward compatibility. However, the generated code changed the method signature from:
apirequest(param1)
to apirequest(param1, param2) - where param2 is optional and has default value defined
In our tests, it was calling apirequest(param1) which caused tests to break as there was now mismatch in no. of params for the method causing compile error.
I tried using useOptional=true in additional properties and set datatype for optional param to Optional, did not help - generated same method with no change in signature.
Tried upgrading to 2.2.3, but it crashed while processing some of the APIs where body param is List I see it fixed as issue #6079 (e8bdf71#diff-0c1b6d04d7c2c41f87f7c710a5610d88) but is not yet available. Temporarily tried setting to String in such cases, just to see if it helps the actual problem, the generated method still remained same with 2 params causing test to fail.
Not sure about how we can overcome this situation, so as not to break our tests with addition of optional parameter. Any suggestions/pointers would be of real help
The text was updated successfully, but these errors were encountered:
We have codegen(2.2.2) to generate java client code for our tests. In a recent change, an optional query parameter was added to one of the APIs with default value specified.
This shouldn't cause any issue as its optional and also has default value, so it does support backward compatibility. However, the generated code changed the method signature from:
apirequest(param1)
to apirequest(param1, param2) - where param2 is optional and has default value defined
In our tests, it was calling apirequest(param1) which caused tests to break as there was now mismatch in no. of params for the method causing compile error.
I tried using useOptional=true in additional properties and set datatype for optional param to Optional, did not help - generated same method with no change in signature.
Tried upgrading to 2.2.3, but it crashed while processing some of the APIs where body param is List I see it fixed as issue #6079 (e8bdf71#diff-0c1b6d04d7c2c41f87f7c710a5610d88) but is not yet available. Temporarily tried setting to String in such cases, just to see if it helps the actual problem, the generated method still remained same with 2 params causing test to fail.
Not sure about how we can overcome this situation, so as not to break our tests with addition of optional parameter. Any suggestions/pointers would be of real help
The text was updated successfully, but these errors were encountered: