Skip to content

Commit

Permalink
Merge branch 'main' into feat/browse-java
Browse files Browse the repository at this point in the history
  • Loading branch information
millotp committed Aug 25, 2022
2 parents 8e2d96a + af29144 commit 11a306e
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 59 deletions.
41 changes: 1 addition & 40 deletions clients/algoliasearch-client-java-2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,13 @@
## [4.4.7-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.4.6-SNAPSHOT...4.4.7-SNAPSHOT)
## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/next)

- [4c1596df](https://github.com/algolia/api-clients-automation/commit/4c1596df) fix(clients): list available regions when region is missing ([#916](https://github.com/algolia/api-clients-automation/pull/916)) by [@shortcuts](https://github.com/shortcuts/)
- [be45fc4e](https://github.com/algolia/api-clients-automation/commit/be45fc4e) fix(specs): make `batch` body parameters required ([#917](https://github.com/algolia/api-clients-automation/pull/917)) by [@shortcuts](https://github.com/shortcuts/)

## [4.4.6-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.4.5-SNAPSHOT...4.4.6-SNAPSHOT)

- [c2a054fa](https://github.com/algolia/api-clients-automation/commit/c2a054fa) fix(specs): allow `searchParams` in `browse` method ([#911](https://github.com/algolia/api-clients-automation/pull/911)) by [@shortcuts](https://github.com/shortcuts/)

## [4.4.5-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.4.4-SNAPSHOT...4.4.5-SNAPSHOT)

- [07c169f5](https://github.com/algolia/api-clients-automation/commit/07c169f5) fix(specs): browseResponse, IndexSettings and searchResponse ([#900](https://github.com/algolia/api-clients-automation/pull/900)) by [@shortcuts](https://github.com/shortcuts/)

## [4.4.4-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.4.3-SNAPSHOT...4.4.4-SNAPSHOT)

- [005f9ed3](https://github.com/algolia/api-clients-automation/commit/005f9ed3) fix(specs): wrong body parameter name ([#896](https://github.com/algolia/api-clients-automation/pull/896)) by [@shortcuts](https://github.com/shortcuts/)

## [4.4.3-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.4.2-SNAPSHOT...4.4.3-SNAPSHOT)

- [193fb73d](https://github.com/algolia/api-clients-automation/commit/193fb73d) fix(specs): `getApiKeyResponse`, `multipleBatch`, `partialUpdateObject` ([#889](https://github.com/algolia/api-clients-automation/pull/889)) by [@shortcuts](https://github.com/shortcuts/)

## [4.4.2-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.4.1-SNAPSHOT...4.4.2-SNAPSHOT)

- [95ba0016](https://github.com/algolia/api-clients-automation/commit/95ba0016) fix(specs): `rules` and `objects` parameters/responses ([#876](https://github.com/algolia/api-clients-automation/pull/876)) by [@shortcuts](https://github.com/shortcuts/)

## [4.4.1-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.4.0-SNAPSHOT...4.4.1-SNAPSHOT)

- [6bdc94f5](https://github.com/algolia/api-clients-automation/commit/6bdc94f5) fix(specs): make `hits` required, `facets` count as an integer, `searchParams` as optional ([#868](https://github.com/algolia/api-clients-automation/pull/868)) by [@shortcuts](https://github.com/shortcuts/)

## [4.4.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.3.0-SNAPSHOT...4.4.0-SNAPSHOT)

- [d3fb62c8](https://github.com/algolia/api-clients-automation/commit/d3fb62c8) feat(java): generic support for hits ([#829](https://github.com/algolia/api-clients-automation/pull/829)) by [@millotp](https://github.com/millotp/)
- [a4346a72](https://github.com/algolia/api-clients-automation/commit/a4346a72) fix(clients): make POST body related to the endpoint, assert body in tests ([#849](https://github.com/algolia/api-clients-automation/pull/849)) by [@shortcuts](https://github.com/shortcuts/)
- [22bf1c39](https://github.com/algolia/api-clients-automation/commit/22bf1c39) fix(specs): wrong parameters for `searchSynonyms` ([#852](https://github.com/algolia/api-clients-automation/pull/852)) by [@shortcuts](https://github.com/shortcuts/)
Expand All @@ -41,37 +20,19 @@
- [a11e84da](https://github.com/algolia/api-clients-automation/commit/a11e84da) fix(specs): fix missing params and types ([#772](https://github.com/algolia/api-clients-automation/pull/772)) by [@shortcuts](https://github.com/shortcuts/)
- [bc14a8c5](https://github.com/algolia/api-clients-automation/commit/bc14a8c5) feat(specs): Add tags to the settings and search params ([#768](https://github.com/algolia/api-clients-automation/pull/768)) by [@clemfromspace](https://github.com/clemfromspace/)
- [ce95833f](https://github.com/algolia/api-clients-automation/commit/ce95833f) fix(java): rename one of methods for better dx APIC-539 ([#763](https://github.com/algolia/api-clients-automation/pull/763)) by [@millotp](https://github.com/millotp/)

## [4.3.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.2.4-SNAPSHOT...4.3.0-SNAPSHOT)

- [23a72c39](https://github.com/algolia/api-clients-automation/commit/23a72c39) fix(specs): correct type for highlightResult and snippetResult ([#783](https://github.com/algolia/api-clients-automation/pull/783)) by [@millotp](https://github.com/millotp/)
- [a11e84da](https://github.com/algolia/api-clients-automation/commit/a11e84da) fix(specs): fix missing params and types ([#772](https://github.com/algolia/api-clients-automation/pull/772)) by [@shortcuts](https://github.com/shortcuts/)
- [bc14a8c5](https://github.com/algolia/api-clients-automation/commit/bc14a8c5) feat(specs): Add tags to the settings and search params ([#768](https://github.com/algolia/api-clients-automation/pull/768)) by [@clemfromspace](https://github.com/clemfromspace/)

## [4.2.4-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.2.2-SNAPSHOT...4.2.4-SNAPSHOT)

- [ce95833f](https://github.com/algolia/api-clients-automation/commit/ce95833f) fix(java): rename one of methods for better dx APIC-539 ([#763](https://github.com/algolia/api-clients-automation/pull/763)) by [@millotp](https://github.com/millotp/)

## [4.2.2-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.2.1-SNAPSHOT...4.2.2-SNAPSHOT)

- [7a858225](https://github.com/algolia/api-clients-automation/commit/7a858225) fix(specs): correct type for `renderingContent` and `consequenceParams` ([#759](https://github.com/algolia/api-clients-automation/pull/759)) by [@shortcuts](https://github.com/shortcuts/)

## [4.2.1-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.2.0-SNAPSHOT...4.2.1-SNAPSHOT)

- [1756059a](https://github.com/algolia/api-clients-automation/commit/1756059a) fix(java): use body as error message APIC-541 ([#734](https://github.com/algolia/api-clients-automation/pull/734)) by [@millotp](https://github.com/millotp/)

## [4.2.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.1.0-SNAPSHOT...4.2.0-SNAPSHOT)

- [61343d52](https://github.com/algolia/api-clients-automation/commit/61343d52) fix(specs): correct type for `typoTolerance` ([#722](https://github.com/algolia/api-clients-automation/pull/722)) by [@shortcuts](https://github.com/shortcuts/)
- [c917710b](https://github.com/algolia/api-clients-automation/commit/c917710b) fix(specs): types and parameters ([#708](https://github.com/algolia/api-clients-automation/pull/708)) by [@shortcuts](https://github.com/shortcuts/)
- [762836b1](https://github.com/algolia/api-clients-automation/commit/762836b1) fix(java): catch null exception for ClientOptions APIC-537 ([#703](https://github.com/algolia/api-clients-automation/pull/703)) by [@millotp](https://github.com/millotp/)
- [90e531a1](https://github.com/algolia/api-clients-automation/commit/90e531a1) fix(java): add javadoc to all methods APIC-538 ([#704](https://github.com/algolia/api-clients-automation/pull/704)) by [@millotp](https://github.com/millotp/)
- [14190d7b](https://github.com/algolia/api-clients-automation/commit/14190d7b) feat(java): enable custom level debug APIC-535 ([#705](https://github.com/algolia/api-clients-automation/pull/705)) by [@millotp](https://github.com/millotp/)
- [95b5ae77](https://github.com/algolia/api-clients-automation/commit/95b5ae77) feat(java): remove default and strict test ([#701](https://github.com/algolia/api-clients-automation/pull/701)) by [@millotp](https://github.com/millotp/)
- [38c0ddc0](https://github.com/algolia/api-clients-automation/commit/38c0ddc0) fix(java): use batch and class in playground and doc ([#696](https://github.com/algolia/api-clients-automation/pull/696)) by [@millotp](https://github.com/millotp/)

## [4.1.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.1.0-SNAPSHOT)

- [baaf7674](https://github.com/algolia/api-clients-automation/commit/baaf7674) fix(clients): rename `maxTrial` to `maxRetries` ([#659](https://github.com/algolia/api-clients-automation/pull/659)) by [@shortcuts](https://github.com/shortcuts/)
- [cbd81a21](https://github.com/algolia/api-clients-automation/commit/cbd81a21) fix(java): use addAlgoliaAgent ([#652](https://github.com/algolia/api-clients-automation/pull/652)) by [@millotp](https://github.com/millotp/)
- [d6305145](https://github.com/algolia/api-clients-automation/commit/d6305145) feat(java): replace EchoRequester by Interceptor APIC-522 ([#648](https://github.com/algolia/api-clients-automation/pull/648)) by [@millotp](https://github.com/millotp/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public AbtestingClient(String appId, String apiKey, String region) {
}

public AbtestingClient(String appId, String apiKey, String region, ClientOptions options) {
super(appId, apiKey, "Abtesting", "4.4.7-SNAPSHOT", options);
super(appId, apiKey, "Abtesting", "4.0.0-SNAPSHOT", options);
if (options != null && options.getHosts() != null) {
this.setHosts(options.getHosts());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public AnalyticsClient(String appId, String apiKey, String region) {
}

public AnalyticsClient(String appId, String apiKey, String region, ClientOptions options) {
super(appId, apiKey, "Analytics", "4.4.7-SNAPSHOT", options);
super(appId, apiKey, "Analytics", "4.0.0-SNAPSHOT", options);
if (options != null && options.getHosts() != null) {
this.setHosts(options.getHosts());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public InsightsClient(String appId, String apiKey, String region) {
}

public InsightsClient(String appId, String apiKey, String region, ClientOptions options) {
super(appId, apiKey, "Insights", "4.4.7-SNAPSHOT", options);
super(appId, apiKey, "Insights", "4.0.0-SNAPSHOT", options);
if (options != null && options.getHosts() != null) {
this.setHosts(options.getHosts());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public PersonalizationClient(String appId, String apiKey, String region) {
}

public PersonalizationClient(String appId, String apiKey, String region, ClientOptions options) {
super(appId, apiKey, "Personalization", "4.4.7-SNAPSHOT", options);
super(appId, apiKey, "Personalization", "4.0.0-SNAPSHOT", options);
if (options != null && options.getHosts() != null) {
this.setHosts(options.getHosts());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public PredictClient(String appId, String apiKey, String region) {
}

public PredictClient(String appId, String apiKey, String region, ClientOptions options) {
super(appId, apiKey, "Predict", "4.4.7-SNAPSHOT", options);
super(appId, apiKey, "Predict", "4.0.0-SNAPSHOT", options);
if (options != null && options.getHosts() != null) {
this.setHosts(options.getHosts());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public QuerySuggestionsClient(String appId, String apiKey, String region) {
}

public QuerySuggestionsClient(String appId, String apiKey, String region, ClientOptions options) {
super(appId, apiKey, "QuerySuggestions", "4.4.7-SNAPSHOT", options);
super(appId, apiKey, "QuerySuggestions", "4.0.0-SNAPSHOT", options);
if (options != null && options.getHosts() != null) {
this.setHosts(options.getHosts());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public RecommendClient(String appId, String apiKey) {
}

public RecommendClient(String appId, String apiKey, ClientOptions options) {
super(appId, apiKey, "Recommend", "4.4.7-SNAPSHOT", options);
super(appId, apiKey, "Recommend", "4.0.0-SNAPSHOT", options);
if (options != null && options.getHosts() != null) {
this.setHosts(options.getHosts());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public SearchClient(String appId, String apiKey) {
}

public SearchClient(String appId, String apiKey, ClientOptions options) {
super(appId, apiKey, "Search", "4.4.7-SNAPSHOT", options);
super(appId, apiKey, "Search", "4.0.0-SNAPSHOT", options);
if (options != null && options.getHosts() != null) {
this.setHosts(options.getHosts());
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.algolia.utils;

import static com.fasterxml.jackson.core.JsonGenerator.Feature;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.json.JsonMapper;
Expand All @@ -19,8 +21,11 @@ public ObjectMapper build() {
ObjectMapper mapper = JsonMapper.builder().disable(MapperFeature.ALLOW_COERCION_OF_SCALARS).build();
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, this.failOnUnknown);
mapper.enable(Feature.AUTO_CLOSE_JSON_CONTENT);
mapper.enable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE);
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
mapper.disable(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS);
mapper.disable(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS);
mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
return mapper;
Expand Down
2 changes: 1 addition & 1 deletion clients/algoliasearch-client-java-2/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=com.algolia
VERSION_NAME=4.4.7-SNAPSHOT
VERSION_NAME=4.0.0-SNAPSHOT

SONATYPE_HOST=DEFAULT
RELEASE_SIGNING_ENABLED=true
2 changes: 1 addition & 1 deletion config/clients.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"java": {
"folder": "clients/algoliasearch-client-java-2",
"gitRepoId": "algoliasearch-client-java-2",
"packageVersion": "4.4.7-SNAPSHOT",
"packageVersion": "4.0.0-SNAPSHOT",
"modelFolder": "algoliasearch-core/src/main/java/com/algolia/model",
"apiFolder": "algoliasearch-core/src/main/java/com/algolia/api",
"customGenerator": "algolia-java",
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/__tests__/createReleasePR.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ describe('createReleasePR', () => {
expect(versions.php.next).toEqual('0.0.1-beta.0');
expect(versions.java.noCommit).toBeUndefined();
expect(versions.java.releaseType).toEqual('minor');
expect(versions.java.next).toEqual('0.1.0-SNAPSHOT');
expect(versions.java.next).toEqual('0.0.1-SNAPSHOT');
});
});

Expand Down
11 changes: 4 additions & 7 deletions scripts/release/createReleasePR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,11 @@ export function getNextVersion(

let nextVersion: string | null = current;

// snapshots should not be bumped as prerelease
if (!current.endsWith('-SNAPSHOT')) {
nextVersion = semver.inc(current, releaseType);
// snapshots should not be bumped
if (current.endsWith('-SNAPSHOT')) {
nextVersion = current;
} else {
nextVersion = `${semver.inc(
current.replace('-SNAPSHOT', ''),
releaseType
)}-SNAPSHOT`;
nextVersion = semver.inc(current, releaseType);
}

if (!nextVersion) {
Expand Down
2 changes: 1 addition & 1 deletion tests/output/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repositories {
}

dependencies {
testImplementation 'com.algolia:algoliasearch-client-java:4.4.7-SNAPSHOT'
testImplementation 'com.algolia:algoliasearch-client-java:4.0.0-SNAPSHOT'
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0'
testImplementation 'org.skyscreamer:jsonassert:1.5.1'
testImplementation 'com.fasterxml.jackson.core:jackson-core:2.13.3'
Expand Down

0 comments on commit 11a306e

Please sign in to comment.