I think that there is a big opportunity for developing a Codegen module for R. A lot of scientists and statisticians are proficient in R, but not necessarily other programming languages. Regardless of skill, being able to generate code for consuming Swagger-documented web services would be enormously useful. Unfortunately, I don't know R myself, so I can't be of much help with this, but I think there could be a lot of benefit from a module of this nature.
Totally agree a R API client would be enormously useful to scientists and statisticians.
If anyone from the community wants to contribute a R API client generator, please reply to let us know.
A good starting point is https://github.com/swagger-api/swagger-codegen/wiki/How-to-add-a-generator-for-a-new-language-or-framework
Might work on this. No promises, but I need an R client for my Swagger API sooner or later anyway. Would need to re-learn R and figure out how to make an extension for it though. :grinning: But R has a HTTP package called RCurl which looks like it does all the HTTP client stuff already, so...
If you'd like to build an R implementation of the petstore, I can help templatize it.
The httr (https://cran.r-project.org/web/packages/httr/) package could be a nice fit.
I'm happy to contribute.
This is an important reference: https://cran.r-project.org/web/packages/httr/vignettes/api-packages.html
If someone is working on this I might be able to help out as well.
It looks like someone has written a R package generator: https://github.com/hrbrmstr/swagger
Does anyone has feedback?
Implementers should also have a look at this list of best practices for writing API packages for R: https://cran.r-project.org/web/packages/httr/vignettes/api-packages.html
@ramnov has created R Petstore client via https://github.com/swagger-api/swagger-codegen/pull/6307
I'll use it to create the R generator and templates.
Hi all, first release of R client generator (beta) has been merged into master via https://github.com/swagger-api/swagger-codegen/pull/6351
Please pull the latest master to give it a try and let us know if you've any feedback.
Thanks for the contribution by @ramnov
Most helpful comment
Hi all, first release of R client generator (beta) has been merged into master via https://github.com/swagger-api/swagger-codegen/pull/6351
Please pull the latest master to give it a try and let us know if you've any feedback.
Thanks for the contribution by @ramnov