connectapi icon indicating copy to clipboard operation
connectapi copied to clipboard

Explore auto-generation of core R6 object

Open colearendt opened this issue 3 years ago • 0 comments

It is possible to use openapi-generator to generate an R6 object directly from the openapi specification. I have done this a bit (and need to stash it on a branch...) - if we get to a functional implementation, it could be very useful to keep our core object up to date!

A couple of issues that the generation has that we would need to address to ensure a good user experience:

  • type safety (see https://github.com/rstudio/connectapi/blob/main/R/ptype.R )
  • error handling
  • backwards compatibility, warnings, error messages, sanity checks, and other UX niceties. We could always do this in wrappers, but there are some items that have worked nicely in R6 (e.g. optional parameters, etc.)
  • paging? (https://github.com/rstudio/connectapi/blob/main/R/page.R)

We should also make / find an easy way to retrieve the openapi spec - either from public docs, a given Connect server, etc.

It is my opinion that we should not dispense with the very friendly user experience helpers like get_*, deploy_*, bundle_*, etc.

colearendt avatar Nov 17 '21 01:11 colearendt