diff --git a/clients/algoliasearch-client-dart/packages/client_composition/build.yaml b/clients/algoliasearch-client-dart/packages/client_composition/build.yaml new file mode 100644 index 00000000000..6d71b406a77 --- /dev/null +++ b/clients/algoliasearch-client-dart/packages/client_composition/build.yaml @@ -0,0 +1,14 @@ +targets: + $default: + builders: + json_serializable: + options: + any_map: false + checked: true + create_factory: true + create_to_json: true + disallow_unrecognized_keys: false + explicit_to_json: true + field_rename: none + ignore_unannotated: false + include_if_null: false diff --git a/clients/algoliasearch-client-php/lib/Algolia.php b/clients/algoliasearch-client-php/lib/Algolia.php index dde72eaad0a..c40fc2c0e50 100644 --- a/clients/algoliasearch-client-php/lib/Algolia.php +++ b/clients/algoliasearch-client-php/lib/Algolia.php @@ -3,12 +3,8 @@ namespace Algolia\AlgoliaSearch; use Algolia\AlgoliaSearch\Cache\NullCacheDriver; -use Algolia\AlgoliaSearch\Http\CurlHttpClient; -use Algolia\AlgoliaSearch\Http\GuzzleHttpClient; use Algolia\AlgoliaSearch\Http\HttpClientInterface; use Algolia\AlgoliaSearch\Log\DebugLogger; -use GuzzleHttp\Client; -use GuzzleHttp\ClientInterface; use Psr\Log\LoggerInterface; use Psr\SimpleCache\CacheInterface; @@ -19,19 +15,19 @@ final class Algolia /** * Holds an instance of the simple cache repository (PSR-16). * - * @var null|CacheInterface + * @var null|\Psr\SimpleCache\CacheInterface */ private static $cache; /** * Holds an instance of the logger (PSR-3). * - * @var null|LoggerInterface + * @var null|\Psr\Log\LoggerInterface */ private static $logger; /** - * @var HttpClientInterface + * @var \Algolia\AlgoliaSearch\Http\HttpClientInterface */ private static $httpClient; @@ -47,7 +43,7 @@ public static function isCacheEnabled() /** * Gets the cache instance. * - * @return CacheInterface + * @return \Psr\SimpleCache\CacheInterface */ public static function getCache() { @@ -69,7 +65,7 @@ public static function setCache(CacheInterface $cache) /** * Gets the logger instance. * - * @return LoggerInterface + * @return \Psr\Log\LoggerInterface */ public static function getLogger() { @@ -94,23 +90,23 @@ public static function getHttpClient() if (interface_exists('\GuzzleHttp\ClientInterface')) { if (defined('\GuzzleHttp\ClientInterface::VERSION')) { $guzzleVersion = (int) mb_substr( - Client::VERSION, + \GuzzleHttp\Client::VERSION, 0, 1 ); } else { - $guzzleVersion = ClientInterface::MAJOR_VERSION; + $guzzleVersion = \GuzzleHttp\ClientInterface::MAJOR_VERSION; } } if (null === self::$httpClient) { if (class_exists('\GuzzleHttp\Client') && 6 <= $guzzleVersion) { self::setHttpClient( - new GuzzleHttpClient() + new \Algolia\AlgoliaSearch\Http\GuzzleHttpClient() ); } else { self::setHttpClient( - new CurlHttpClient() + new \Algolia\AlgoliaSearch\Http\CurlHttpClient() ); } } diff --git a/generators/src/main/java/com/algolia/codegen/cts/tests/TestsClient.java b/generators/src/main/java/com/algolia/codegen/cts/tests/TestsClient.java index a6e4c68445e..da0eaa08fd9 100644 --- a/generators/src/main/java/com/algolia/codegen/cts/tests/TestsClient.java +++ b/generators/src/main/java/com/algolia/codegen/cts/tests/TestsClient.java @@ -107,6 +107,11 @@ public void run(Map models, Map } else if (step.type.equals("method")) { ope = operations.get(step.method); if (ope == null) { + // some clients don't have custom methods + if (step.method.startsWith("custom") && client.equals("composition")) { + continue skipTest; + } + throw new CTSException("Cannot find operation for method: " + step.method, test.testName); } stepOut.put("stepTemplate", "tests/client/method.mustache"); diff --git a/specs/composition/spec.yml b/specs/composition/spec.yml index 22b80074355..f2feb9814e9 100644 --- a/specs/composition/spec.yml +++ b/specs/composition/spec.yml @@ -47,12 +47,6 @@ x-tagGroups: tags: - Compositions paths: - # ###################### - # ### Custom request ### - # ###################### - /{path}: - $ref: '../common/paths/customRequest.yml' - # ######################## # ### Search Endpoints ### # ########################