Skip to content

Commit 11a306e

Browse files
committed
Merge branch 'main' into feat/browse-java
2 parents 8e2d96a + af29144 commit 11a306e

File tree

15 files changed

+22
-59
lines changed

15 files changed

+22
-59
lines changed

clients/algoliasearch-client-java-2/CHANGELOG.md

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,13 @@
1-
## [4.4.7-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.4.6-SNAPSHOT...4.4.7-SNAPSHOT)
1+
## [4.0.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/next)
22

33
- [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/)
44
- [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/)
5-
6-
## [4.4.6-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.4.5-SNAPSHOT...4.4.6-SNAPSHOT)
7-
85
- [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/)
9-
10-
## [4.4.5-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.4.4-SNAPSHOT...4.4.5-SNAPSHOT)
11-
126
- [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/)
13-
14-
## [4.4.4-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.4.3-SNAPSHOT...4.4.4-SNAPSHOT)
15-
167
- [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/)
17-
18-
## [4.4.3-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.4.2-SNAPSHOT...4.4.3-SNAPSHOT)
19-
208
- [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/)
21-
22-
## [4.4.2-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.4.1-SNAPSHOT...4.4.2-SNAPSHOT)
23-
249
- [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/)
25-
26-
## [4.4.1-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.4.0-SNAPSHOT...4.4.1-SNAPSHOT)
27-
2810
- [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/)
29-
30-
## [4.4.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.3.0-SNAPSHOT...4.4.0-SNAPSHOT)
31-
3211
- [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/)
3312
- [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/)
3413
- [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/)
@@ -41,37 +20,19 @@
4120
- [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/)
4221
- [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/)
4322
- [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/)
44-
45-
## [4.3.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.2.4-SNAPSHOT...4.3.0-SNAPSHOT)
46-
4723
- [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/)
4824
- [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/)
4925
- [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/)
50-
51-
## [4.2.4-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.2.2-SNAPSHOT...4.2.4-SNAPSHOT)
52-
5326
- [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/)
54-
55-
## [4.2.2-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.2.1-SNAPSHOT...4.2.2-SNAPSHOT)
56-
5727
- [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/)
58-
59-
## [4.2.1-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.2.0-SNAPSHOT...4.2.1-SNAPSHOT)
60-
6128
- [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/)
62-
63-
## [4.2.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.1.0-SNAPSHOT...4.2.0-SNAPSHOT)
64-
6529
- [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/)
6630
- [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/)
6731
- [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/)
6832
- [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/)
6933
- [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/)
7034
- [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/)
7135
- [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/)
72-
73-
## [4.1.0-SNAPSHOT](https://github.com/algolia/algoliasearch-client-java-2/compare/4.0.0-SNAPSHOT...4.1.0-SNAPSHOT)
74-
7536
- [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/)
7637
- [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/)
7738
- [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/)

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/AbtestingClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public AbtestingClient(String appId, String apiKey, String region) {
3535
}
3636

3737
public AbtestingClient(String appId, String apiKey, String region, ClientOptions options) {
38-
super(appId, apiKey, "Abtesting", "4.4.7-SNAPSHOT", options);
38+
super(appId, apiKey, "Abtesting", "4.0.0-SNAPSHOT", options);
3939
if (options != null && options.getHosts() != null) {
4040
this.setHosts(options.getHosts());
4141
} else {

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/AnalyticsClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public AnalyticsClient(String appId, String apiKey, String region) {
3535
}
3636

3737
public AnalyticsClient(String appId, String apiKey, String region, ClientOptions options) {
38-
super(appId, apiKey, "Analytics", "4.4.7-SNAPSHOT", options);
38+
super(appId, apiKey, "Analytics", "4.0.0-SNAPSHOT", options);
3939
if (options != null && options.getHosts() != null) {
4040
this.setHosts(options.getHosts());
4141
} else {

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/InsightsClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public InsightsClient(String appId, String apiKey, String region) {
3535
}
3636

3737
public InsightsClient(String appId, String apiKey, String region, ClientOptions options) {
38-
super(appId, apiKey, "Insights", "4.4.7-SNAPSHOT", options);
38+
super(appId, apiKey, "Insights", "4.0.0-SNAPSHOT", options);
3939
if (options != null && options.getHosts() != null) {
4040
this.setHosts(options.getHosts());
4141
} else {

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/PersonalizationClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public PersonalizationClient(String appId, String apiKey, String region) {
2727
}
2828

2929
public PersonalizationClient(String appId, String apiKey, String region, ClientOptions options) {
30-
super(appId, apiKey, "Personalization", "4.4.7-SNAPSHOT", options);
30+
super(appId, apiKey, "Personalization", "4.0.0-SNAPSHOT", options);
3131
if (options != null && options.getHosts() != null) {
3232
this.setHosts(options.getHosts());
3333
} else {

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/PredictClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public PredictClient(String appId, String apiKey, String region) {
2727
}
2828

2929
public PredictClient(String appId, String apiKey, String region, ClientOptions options) {
30-
super(appId, apiKey, "Predict", "4.4.7-SNAPSHOT", options);
30+
super(appId, apiKey, "Predict", "4.0.0-SNAPSHOT", options);
3131
if (options != null && options.getHosts() != null) {
3232
this.setHosts(options.getHosts());
3333
} else {

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/QuerySuggestionsClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public QuerySuggestionsClient(String appId, String apiKey, String region) {
2727
}
2828

2929
public QuerySuggestionsClient(String appId, String apiKey, String region, ClientOptions options) {
30-
super(appId, apiKey, "QuerySuggestions", "4.4.7-SNAPSHOT", options);
30+
super(appId, apiKey, "QuerySuggestions", "4.0.0-SNAPSHOT", options);
3131
if (options != null && options.getHosts() != null) {
3232
this.setHosts(options.getHosts());
3333
} else {

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/RecommendClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public RecommendClient(String appId, String apiKey) {
2929
}
3030

3131
public RecommendClient(String appId, String apiKey, ClientOptions options) {
32-
super(appId, apiKey, "Recommend", "4.4.7-SNAPSHOT", options);
32+
super(appId, apiKey, "Recommend", "4.0.0-SNAPSHOT", options);
3333
if (options != null && options.getHosts() != null) {
3434
this.setHosts(options.getHosts());
3535
} else {

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/SearchClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public SearchClient(String appId, String apiKey) {
3030
}
3131

3232
public SearchClient(String appId, String apiKey, ClientOptions options) {
33-
super(appId, apiKey, "Search", "4.4.7-SNAPSHOT", options);
33+
super(appId, apiKey, "Search", "4.0.0-SNAPSHOT", options);
3434
if (options != null && options.getHosts() != null) {
3535
this.setHosts(options.getHosts());
3636
} else {

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/JSONBuilder.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.algolia.utils;
22

3+
import static com.fasterxml.jackson.core.JsonGenerator.Feature;
4+
35
import com.fasterxml.jackson.annotation.*;
46
import com.fasterxml.jackson.databind.*;
57
import com.fasterxml.jackson.databind.json.JsonMapper;
@@ -19,8 +21,11 @@ public ObjectMapper build() {
1921
ObjectMapper mapper = JsonMapper.builder().disable(MapperFeature.ALLOW_COERCION_OF_SCALARS).build();
2022
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
2123
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, this.failOnUnknown);
24+
mapper.enable(Feature.AUTO_CLOSE_JSON_CONTENT);
2225
mapper.enable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE);
2326
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
27+
mapper.disable(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS);
28+
mapper.disable(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS);
2429
mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
2530
mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
2631
return mapper;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
GROUP=com.algolia
2-
VERSION_NAME=4.4.7-SNAPSHOT
2+
VERSION_NAME=4.0.0-SNAPSHOT
33

44
SONATYPE_HOST=DEFAULT
55
RELEASE_SIGNING_ENABLED=true

config/clients.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"java": {
33
"folder": "clients/algoliasearch-client-java-2",
44
"gitRepoId": "algoliasearch-client-java-2",
5-
"packageVersion": "4.4.7-SNAPSHOT",
5+
"packageVersion": "4.0.0-SNAPSHOT",
66
"modelFolder": "algoliasearch-core/src/main/java/com/algolia/model",
77
"apiFolder": "algoliasearch-core/src/main/java/com/algolia/api",
88
"customGenerator": "algolia-java",

scripts/release/__tests__/createReleasePR.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ describe('createReleasePR', () => {
538538
expect(versions.php.next).toEqual('0.0.1-beta.0');
539539
expect(versions.java.noCommit).toBeUndefined();
540540
expect(versions.java.releaseType).toEqual('minor');
541-
expect(versions.java.next).toEqual('0.1.0-SNAPSHOT');
541+
expect(versions.java.next).toEqual('0.0.1-SNAPSHOT');
542542
});
543543
});
544544

scripts/release/createReleasePR.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,11 @@ export function getNextVersion(
186186

187187
let nextVersion: string | null = current;
188188

189-
// snapshots should not be bumped as prerelease
190-
if (!current.endsWith('-SNAPSHOT')) {
191-
nextVersion = semver.inc(current, releaseType);
189+
// snapshots should not be bumped
190+
if (current.endsWith('-SNAPSHOT')) {
191+
nextVersion = current;
192192
} else {
193-
nextVersion = `${semver.inc(
194-
current.replace('-SNAPSHOT', ''),
195-
releaseType
196-
)}-SNAPSHOT`;
193+
nextVersion = semver.inc(current, releaseType);
197194
}
198195

199196
if (!nextVersion) {

tests/output/java/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repositories {
77
}
88

99
dependencies {
10-
testImplementation 'com.algolia:algoliasearch-client-java:4.4.7-SNAPSHOT'
10+
testImplementation 'com.algolia:algoliasearch-client-java:4.0.0-SNAPSHOT'
1111
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0'
1212
testImplementation 'org.skyscreamer:jsonassert:1.5.1'
1313
testImplementation 'com.fasterxml.jackson.core:jackson-core:2.13.3'

0 commit comments

Comments
 (0)