I wonder how I can include a plumber API defintion inside my package so that the plumber endpoints can directly use the functionality provided by the package itself. During my research, I found this repo
plumbpkg/manifest.json at main · sol-eng/plumbpkg · GitHub
At first glance it looked like it was exactly what I was looking for, but a closer look revealed the following problem. First of all, I'm using the full Posit framework, that is, workbench, package manager and connect server. This leads to my problem: In the above link, the package itself is registered inside the
manifest.json file, i.e.
plumbpkg. This is required as inside the api endpoints, the author uses the namespace
plumbpkg:: in order to access the files/functions. However, this introduces a self-references which I don't like. This would mean that I need that before I can test changes I need to upload a new version of the package
plumbpkg to the package manager, use
rsconnect::writeManifest() to register this new version in the manifest and then upload the new package version to the
I know that there is a package called
pkgload::load_all() which would load all the functions inside the current package. However, I experienced several naming clashes with my reference classes when using this method, so this is no option for me.
What is the common or recommended way of including a plumber defintion inside a package?