diff --git a/website/docs/automation/add-new-language.md b/website/docs/automation/add-new-language.md index 7cefc4bc69..a8db1dded9 100644 --- a/website/docs/automation/add-new-language.md +++ b/website/docs/automation/add-new-language.md @@ -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