Skip to content
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

Add a createAPIProject #22

Open
4 tasks
stephlocke opened this issue Apr 16, 2017 · 8 comments
Open
4 tasks

Add a createAPIProject #22

stephlocke opened this issue Apr 16, 2017 · 8 comments

Comments

@stephlocke
Copy link
Member

@hrbrmstr started a project a while ago close to my heart hrbrmstr/swagger.

I'd like to revive that project to generate functions from API definitions produced in swagger - this would enable us to point at a swagger definition and produce not just a package skeleton with best practices but functions too.

  • Make sure swagger can generate functions from a definition
  • Add dependency on swagger from here
  • Write function that accepts a name and a swagger definition and generates a package project with R functions
  • Extend the add-in to allow this type of project to be created
@maelle
Copy link
Contributor

maelle commented Jul 9, 2018

see also rstudio/swagger#1 (comment) by @hrbrmstr too

@maelle
Copy link
Contributor

maelle commented Jul 11, 2018

see also https://github.com/mkearney/useapi by @mkearney

@maelle
Copy link
Contributor

maelle commented Nov 15, 2018

Any API examples for this @stephlocke?

@maelle
Copy link
Contributor

maelle commented Dec 9, 2019

this sure reminds me of our efforts in the hubspot package! Except Hubspot's API is not swagger compliant.

@stephlocke
Copy link
Member Author

Every API is a special snowflake.
Stuff like adding the mocking infrastructure for tests, adding in ratelimitr etc might be a good start even if the dream would be to go from a swagger doc

@maelle
Copy link
Contributor

maelle commented Dec 9, 2019

Yeah, I'll revisit this once hubspot is in good shape.

Agree reg the dream. ✨

@jonthegeek
Copy link

Did anything come of this? I'm trying to follow the breadcrumbs in various repo discussions 🙃

@maelle
Copy link
Contributor

maelle commented Apr 19, 2022

No, but for hubspot https://github.com/DoubleYouGTT/hubspot/ I vaguely remember writing code to automate adding new endpoints... although I see no trace of this now 🤔 Maybe the code only extracted endpoints to have a list of them, like a checklist.

I think you had found https://blog.r-hub.io/2020/02/10/code-generation/ which is the only tip I'd have 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants