Skip to content

docs: note on exposed dependencies #428

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

Merged
merged 6 commits into from
Apr 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions website/docs/automation/add-new-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,18 @@ Algolia for Java (5.0.0); Search (5.0.0); JVM (11.0.14); experimental

You can take a look at the Java implementation [here](https://github.com/algolia/api-clients-automation/pull/347).

### Dependencies

You can use any dependency you want to create the client, it can be Json parser or HTTP client, but it's important to never expose those dependencies through the client, meaning:
- a function cannot return an object from a dependency
- a function cannot accept an object from a dependency as a parameter
- and so on

It matters because when a dependency is exposed, a breaking change from our deps can affect the user code while the API client is still working correctly (because they have to use the dependency in their code),
and that prevent us from upgrading our deps. In some languages it also requires the user to add our internal dependencies to his build system, which is very inconvenient and our clients should always be standalone.

To achieve this you can create interfaces that can be exposed, and wrap the method you want to be exposed, for an HTTP client for example.

### Requesters

> TODO: informations
Expand Down