We want to add a new API client generator for Apex, a programming language invented by SalesForce.
Latest master
If anyone wants to work on this task, please reply to let us know.
Given that it's similar to Java, cloning the Java API client generator is a good starting point
Hey there @wing328, I think I can take this on. Have worked on two custom generators, so I think I have the flow good.
Thanks @khalidx
Cool, if you could go ahead and assign it to me I'll get started.
Also, I landed here after noticing the following question on the SalesForce Success Community Forum:
SalesForce Idea: "Swagger2Apex" REST callout code generator
@khalidx i don't have time to help write it but I can help you test it. Let me know when you get to that stage if you need it.
@pcon Sounds great! Thank you for the help.
I've actually been working on one. It's complete, but could probably use some tweaks from someone who's already built a few generators. @khalidx if you're not already underway, this could give you a head start.
I had to work around quite a few of the intricacies (often inconvenient, undocumented) of Apex so it's not quite a clone of the Java codegen.
@asnelling "Often inconvenient, undocumented" -- sounds like Apex ;)
That's awesome, can you share your repo/branch? I only have basic scenarios working so far, with paths/model generation.
Here it is: https://github.com/asnelling/swagger-codegen/tree/apex-codegen
I was constrained by Apex limits, so I prioritized code reduction in my design decisions. I figure other organizations may run into that as well, anyways.
Edit: Guess I should tag @khalidx
@asnelling do you mind submitting a PR so that we can review it?
@asnelling Let me know if you're going to proceed with your generator. I started my own and may (want) stop if yours gets added. ;-)
@khalidx
@asnelling may I know if you need help submitting a PR? or you want us to submit a PR based on https://github.com/asnelling/swagger-codegen/tree/apex-codegen on your behalf?
@khalidx @muenzpraeger I've added Apex API client generator based on https://github.com/asnelling/swagger-codegen/tree/apex-codegen by @asnelling
Please pull the latest master to give it a try.
For discussion on enhancing the Apex client generator, please go to https://github.com/swagger-api/swagger-codegen/issues/5670
UPDATE: another PR to add Apex generator has been filed by @nikhltripathi696
Please check it out and see if we can merge some of the features/enhancements into the Apex generator in the current master.
@wing328 I'm not sure what @nikhltripathi696 wants to add. That PR only contains old code/commits from the initial creation of the generator.
https://github.com/swagger-api/swagger-codegen/pull/6849/commits
@muenzpraeger thanks for reviewing
@nikhltripathi696 did you mean to submit a PR with enhancements to the current Apex client generator?
Hello @wing328 , while working on CUFX 4.1 API integration, I came across the swagger generated client SDK code for APEX. I found multiple issues in the generated code. While I understand the generated code may not ensure that everything works without any trouble, I wanted to know if we were able to test some basic behaviors of generated code on Apex. I would be interested in knowing more.
FYI : This is my first time on using SwaggerHub and the generated code.
@arangari We moved over here => https://github.com/OpenAPITools/openapi-generator
@muenzpraeger - thanks for the help. Does this mean, I can get the client SDK of published APIs on openAPI?
@arangari The core maintainers of this repo moved to OpenAPITools. I'd look there.
Most helpful comment
Hey there @wing328, I think I can take this on. Have worked on two custom generators, so I think I have the flow good.