Skip to content

Add API client library / cli app? #4

Closed
@tko

Description

@tko

This is an issue that came up in our own internal (private, sorry) app for which I've not found a good sample (though not having much time / priority to research.)

Let's say we want to have a service providing the following. Including some imaginary dependencies that are unique to each:

  1. a server -- postgres driver, SAML, OpenTelemetry
  2. client library to interact with the APIs -- (none)
  3. CLI client to interact with the APIs -- terminal colors

In its current form everything is in a single module and so any dependencies needed anywhere will become (indirect) dependencies to the clients, and if you're running security checks over your dependencies you can get flagged that your API client (which is not much more than a glorified http client) has a potential vulnerability due to a database driver/SAML/OpenTelemetry/LLMs -- any other library really -- which are implementation details of the server only and shouldn't really even be visible to the (http) clients.

I believe properly hiding the implementation details would require at least two, maybe three modules with different dependencies sets which isn't entirely trivial to set up (and harder to refactor into afterwards) and a blueprint would be helpful.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions