Class ApiClients

java.lang.Object
com.qtsurfer.api.sdk.internal.ApiClients

public final class ApiClients extends Object
Builds the generated ApiClient the way every workflow of the SDK needs it.

The generated client reads a oneOf by trying each of its types and requiring exactly one to accept the value. With Jackson's default scalar coercion a JSON number is also accepted as a string and as a boolean, so ScalarStrategyParamValue (number, string or boolean) matched two or three types for every number and boolean and failed with "N classes match result, expected 1": a run started with a numeric or boolean params value came back unreadable, though the platform had run it. Coercion is therefore off, which is also what a oneOf of scalars needs to tell its members apart.

The mapper has to be installed on the client. ApiClient.getObjectMapper() hands out a copy on every call, so configuring what it returns changes nothing; and the API classes take their mapper from the client when they are built, so this is done before any of them is.

  • Method Details

    • create

      public static com.qtsurfer.api.client.invoker.ApiClient create()
      A client whose mapper does not coerce scalars between JSON types.