-
Notifications
You must be signed in to change notification settings - Fork 13
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
Feature.xe4 support2 #20
Conversation
I hope, it is right this way. |
Thank you, but still, OpenAPIJSON has too many differences. The idea is not to separate into classes and create abstract methods, but just add IFDEF where needed. Just keep the way the code was before, just add IFDEF where needed, without refactoring the classes. Could you please do that? Also, there are new modifications in OpenApiUtils.pas, it would be good to merge those changing into the pull request to avoid conflicts. |
That's what I said in the first place: The two/three implementations do not share enough code to satisfy a common base class (other than an abstract base), therefore my first implementation with 3 distinct implementations and the trick to ifdef the right one in (to avoid the extra code for abstract base class). This way it is easy to see, what to do to support an other json lib. And if you compare I understood your argument to have everything in one file (from a marketing perspective), therefore I followed your proposal and spent my time to stuff everything into You wrote:
I have done that. But now you write:
Sorry, I am out at this point. I highly appreciate the work you did with openapi-delphi-generator and wanted to give something back. But reading your arguments, I think it is better to stay with your current implementation. Not that many developers will have to support such an old Delphi version. And if they have to, they can refer to my pull request. This way your wrapper class stays readable. When programming, I always try to do the right thing: In this case your wrapper class is a bridge pattern. Normally you would have an abstract base class and two or three classes implementing the bridge. I have provided two variations of this idea. But -sorry- I am not willing to provide an implementation based on ifdefs. What should we do?
|
If you don't mind, I will get to implement XE4 support then based on your pull request #20. |
Yes, please feel free to use the code however you want. |
@yonojoy, thank you very much for your contribution. |
I tested your code. Everything seems to be fixed and working for XE4. |
This is a replacement for pull request #17. All the JSON code is stuffed into one file.