Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Auto-Generate R SDK for REST APIs Using OpenAPI Generator
3 points by wing328hk 3 months ago | hide | past | web | favorite
To generate R SDK or API client for REST API, one can easily do so with the help of OpenAPI Generator (https://github.com/OpenAPITools/openapi-generator). Here are 3 steps to generate the SDK/client:

1. Download the Java JAR (https://oss.sonatype.org/content/repositories/snapshots/org/...)

2. Rename the JAR as "openapi-generator.jar"

3. Run the following command to generate R SDK for Petstore API (https://raw.githubusercontent.com/OpenAPITools/openapi-gener...):

Mac/Linux: - java -jar openapi-generator.jar generate -g r -i https://raw.githubusercontent.com/OpenAPITools/openapi-gener... -o /tmp/petstore/

Windows: - java -jar openapi-generator.jar generate -g r -i https://raw.githubusercontent.com/OpenAPITools/openapi-gener... -o C:\tmp\petstore

The auto-generated documentation (README.md, how to install, etc) can be found in the "docs" folder.

Please give it a try and let me know if you've any feedback/question.




Registration is open for Startup School 2019. Classes start July 22nd.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: