[REQ] [cpp-ue4] is quite broken. I'm not sure if I should just start submitting pull requests?
I've been working with the cpp-ue4 generator.
I've come to the conclusion that while it does generate c++ code that compiles, it's really VERY broken in a bunch of places. It doesn't actually generate a basic client that can execute the calls defined by some very simple input schemas (coming straight out of Django).
e.g. When defaulting to application/json (which seems hardcoded?) It only knows how to do bodyParams and doesn't try to construct a json body from formParams, ever.
e.g. It improperly handles parsing of json responses with regard to vars that are 'writeOnly' or 'required.' It logs parsing errors where there are no actual errors occurring.
So far, these are mustache template fixes. I've forked and branched solutions to these already. And I was considering making pull requests for them.
However, I am hesitant. The cpp-ue4 templates seem so broken that I cannot help but feel that its under heavy revision somewhere else? Or that there's a single maintainer out there who's about to drop a massive change/refactor?
Should I just start dropping little pull requests that, piece by piece, make it actually functional? Or is there some better way to coordinate with what is likely a very large undertaking with others that I simply do no know about?
I don't want to diverge too far from mainline, which suggests I should just fire away with pull requests. But if I am going to begin to conflict with other development or refactor efforts on cpp-ue4, I want to know before I start piling up pull requests.
@leith-bartrich the cpp-ue4 generator is relatively new so it won't cover many edge cases as you may have uncovered.
We definitely welcome PRs to improve the generator.
cc @Kahncode (creator of cpp-ue4 generator)
Hello,
We are using cpp-ue4 generator in production without any issues. Although I'm pretty certain there are still edge cases to be discovered, it should be functional and cover the majority of api specs.
Please let me know and I'll be happy to assist you with the changes you require.
On Tue, Aug 17, 2021, 3:05 AM William Cheng @.***> wrote:
@leith-bartrich https://github.com/leith-bartrich the cpp-ue4 generator is relatively new so it won't cover many edge cases as you may have uncovered.
We definitely welcome PRs to improve the generator.
cc @Kahncode https://github.com/Kahncode (creator of cpp-ue4 generator)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OpenAPITools/openapi-generator/issues/10165#issuecomment-899916955, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALVKNGSSRYTQGDVJUBBLAVLT5GYXDANCNFSM5CIK6WYQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
After reading your observations:
- required/optional vars should be handled just fine, but if you have found more bugs please fix them
- application/json is indeed hard-coded as in other cpp generators, this is much larger improvement that has not been needed so far. Unreal also did not provide a xml parser so I did not want to bloat the generated code with that. But I may be wrong on that one.
- form params should also be handled
- the logging of failed to deserialize response is harmless as we do not fail when the return code indicated success. However it does actually mean that the response did not match the spec, for example a required field was not present. You can step in the de serialization code and see for yourself. I chose to leave it here but unfortunately there is no good way to handle an api that doesn't follow its own spec besides printing this error. Feel free to disable it in your own code, or mark it as a verbose log. On my end this has been quite useful when working with apis that we control, but of course for third parties it has only helped us to file bug reports.
As I said, on our end the generator is used in production and has handled all of the 3rd party apis we have come across and needed to consume. I am absolutely certain there are things it doesn't support, most notably recursive objects as it intentionally does not use pointers, and polymorphism of objects returned with different codes, then again no other cpp generator supported it at the time of writing this.
Cheers
On Tue, Aug 17, 2021, 3:05 AM William Cheng @.***> wrote:
@leith-bartrich https://github.com/leith-bartrich the cpp-ue4 generator is relatively new so it won't cover many edge cases as you may have uncovered.
We definitely welcome PRs to improve the generator.
cc @Kahncode https://github.com/Kahncode (creator of cpp-ue4 generator)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OpenAPITools/openapi-generator/issues/10165#issuecomment-899916955, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALVKNGSSRYTQGDVJUBBLAVLT5GYXDANCNFSM5CIK6WYQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
Thank you. That’s enough information for me to understand how to proceed. I’ll close this issue and submit individual pull requests shortly.
Please tag me in your pull requests, I'll do my best to review fast. Looking forward to your improvements.
On Tue, Aug 17, 2021, 1:23 PM Bradley Friedman @.***> wrote:
Thank you. That’s enough information for me to understand how to proceed. I’ll close this issue and submit individual pull requests shortly.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OpenAPITools/openapi-generator/issues/10165#issuecomment-900212922, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALVKNGU42TWVWWVL5LGPZT3T5JBCHANCNFSM5CIK6WYQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .