Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion clients/algoliasearch-client-javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"test:bundle": "lerna run test:bundle --verbose --include-dependencies"
},
"devDependencies": {
"@types/node": "22.15.34",
"@types/node": "22.16.0",
"bundlewatch": "0.4.1",
"execa": "9.6.0",
"lerna": "8.2.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "0.18.2",
"@types/node": "22.15.34",
"@types/node": "22.16.0",
"publint": "0.3.12",
"rollup": "4.41.0",
"tsup": "8.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "0.18.2",
"@types/node": "22.15.34",
"@types/node": "22.16.0",
"jsdom": "26.1.0",
"publint": "0.3.12",
"ts-node": "10.9.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "0.18.2",
"@types/node": "22.15.34",
"@types/node": "22.16.0",
"publint": "0.3.12",
"rollup": "4.41.0",
"tsup": "8.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "0.18.2",
"@types/node": "22.15.34",
"@types/node": "22.16.0",
"publint": "0.3.12",
"rollup": "4.41.0",
"tsup": "8.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "0.18.2",
"@types/node": "22.15.34",
"@types/node": "22.16.0",
"jsdom": "26.1.0",
"publint": "0.3.12",
"ts-node": "10.9.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "0.18.2",
"@types/node": "22.15.34",
"@types/node": "22.16.0",
"jsdom": "26.1.0",
"publint": "0.3.12",
"tsup": "8.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "0.18.2",
"@types/node": "22.15.34",
"@types/node": "22.16.0",
"cross-fetch": "4.1.0",
"nock": "14.0.5",
"publint": "0.3.12",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "0.18.2",
"@types/node": "22.15.34",
"@types/node": "22.16.0",
"nock": "14.0.5",
"publint": "0.3.12",
"tsup": "8.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
"devDependencies": {
"@arethetypeswrong/cli": "0.18.2",
"@types/node": "22.15.34",
"@types/node": "22.16.0",
"publint": "0.3.12",
"tsup": "8.5.0",
"typescript": "5.8.3"
Expand Down
29 changes: 19 additions & 10 deletions clients/algoliasearch-client-javascript/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ __metadata:
"@algolia/requester-fetch": "npm:5.30.0"
"@algolia/requester-node-http": "npm:5.30.0"
"@arethetypeswrong/cli": "npm:0.18.2"
"@types/node": "npm:22.15.34"
"@types/node": "npm:22.16.0"
publint: "npm:0.3.12"
rollup: "npm:4.41.0"
tsup: "npm:8.5.0"
Expand Down Expand Up @@ -61,7 +61,7 @@ __metadata:
resolution: "@algolia/client-common@workspace:packages/client-common"
dependencies:
"@arethetypeswrong/cli": "npm:0.18.2"
"@types/node": "npm:22.15.34"
"@types/node": "npm:22.16.0"
jsdom: "npm:26.1.0"
publint: "npm:0.3.12"
ts-node: "npm:10.9.2"
Expand All @@ -80,7 +80,7 @@ __metadata:
"@algolia/requester-fetch": "npm:5.30.0"
"@algolia/requester-node-http": "npm:5.30.0"
"@arethetypeswrong/cli": "npm:0.18.2"
"@types/node": "npm:22.15.34"
"@types/node": "npm:22.16.0"
publint: "npm:0.3.12"
rollup: "npm:4.41.0"
tsup: "npm:8.5.0"
Expand Down Expand Up @@ -165,7 +165,7 @@ __metadata:
"@algolia/requester-fetch": "npm:5.30.0"
"@algolia/requester-node-http": "npm:5.30.0"
"@arethetypeswrong/cli": "npm:0.18.2"
"@types/node": "npm:22.15.34"
"@types/node": "npm:22.16.0"
publint: "npm:0.3.12"
rollup: "npm:4.41.0"
tsup: "npm:8.5.0"
Expand Down Expand Up @@ -196,7 +196,7 @@ __metadata:
dependencies:
"@algolia/client-common": "npm:5.30.0"
"@arethetypeswrong/cli": "npm:0.18.2"
"@types/node": "npm:22.15.34"
"@types/node": "npm:22.16.0"
jsdom: "npm:26.1.0"
publint: "npm:0.3.12"
ts-node: "npm:10.9.2"
Expand Down Expand Up @@ -246,7 +246,7 @@ __metadata:
dependencies:
"@algolia/client-common": "npm:5.30.0"
"@arethetypeswrong/cli": "npm:0.18.2"
"@types/node": "npm:22.15.34"
"@types/node": "npm:22.16.0"
jsdom: "npm:26.1.0"
publint: "npm:0.3.12"
tsup: "npm:8.5.0"
Expand All @@ -262,7 +262,7 @@ __metadata:
dependencies:
"@algolia/client-common": "npm:5.30.0"
"@arethetypeswrong/cli": "npm:0.18.2"
"@types/node": "npm:22.15.34"
"@types/node": "npm:22.16.0"
cross-fetch: "npm:4.1.0"
nock: "npm:14.0.5"
publint: "npm:0.3.12"
Expand All @@ -278,7 +278,7 @@ __metadata:
dependencies:
"@algolia/client-common": "npm:5.30.0"
"@arethetypeswrong/cli": "npm:0.18.2"
"@types/node": "npm:22.15.34"
"@types/node": "npm:22.16.0"
nock: "npm:14.0.5"
publint: "npm:0.3.12"
tsup: "npm:8.5.0"
Expand All @@ -296,7 +296,7 @@ __metadata:
"@algolia/requester-fetch": "npm:5.30.0"
"@algolia/requester-node-http": "npm:5.30.0"
"@arethetypeswrong/cli": "npm:0.18.2"
"@types/node": "npm:22.15.34"
"@types/node": "npm:22.16.0"
publint: "npm:0.3.12"
tsup: "npm:8.5.0"
typescript: "npm:5.8.3"
Expand Down Expand Up @@ -2253,6 +2253,15 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:22.16.0":
version: 22.16.0
resolution: "@types/node@npm:22.16.0"
dependencies:
undici-types: "npm:~6.21.0"
checksum: 10/26ebbbd24749caa4a692664290c53cdca63ec717ca250cd2babf3d3da796e9d3d0b6b9814d160693261b5e881796bf0f3c1887fef355b19e9a78fe27cd5e2ce2
languageName: node
linkType: hard

"@types/normalize-package-data@npm:^2.4.0":
version: 2.4.4
resolution: "@types/normalize-package-data@npm:2.4.4"
Expand Down Expand Up @@ -2459,7 +2468,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "algoliasearch-client-javascript@workspace:."
dependencies:
"@types/node": "npm:22.15.34"
"@types/node": "npm:22.16.0"
bundlewatch: "npm:0.4.1"
execa: "npm:9.6.0"
lerna: "npm:8.2.3"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
kotlin = "2.1.21"
ktor = "3.2.0"
ktor = "3.2.1"

[libraries]
# Kotlin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.11.2
sbt.version=1.11.3
2 changes: 1 addition & 1 deletion clients/algoliasearch-client-scala/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.1")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.4")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.5")
2 changes: 1 addition & 1 deletion docs/guides/csharp/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"csharpier": {
"version": "1.0.2",
"version": "1.0.3",
"commands": [
"csharpier"
]
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/csharp/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"csharpier": {
"version": "1.0.2",
"version": "1.0.3",
"commands": [
"csharpier"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ public Set<String> classnames() {
}

public Collection<String> imports() {
return oneOfs.values().stream().map(e -> e.imprt).collect(Collectors.toSet());
return oneOfs
.values()
.stream()
.map(e -> e.imprt)
.collect(Collectors.toSet());
}

Map<String, ModelsMap> clearOneOfFromModels(String libName, Map<String, ModelsMap> modelsMap) {
Expand Down Expand Up @@ -245,7 +249,8 @@ public Set<String> getOneOfTypes(Set<String> types) {
private Set<String> getOneOfType(String type) {
if (oneOfs.containsKey(type)) {
return oneOfs.get(type).types;
} else if (type.startsWith("List<")) { // only lists are supported for now.
} else if (type.startsWith("List<")) {
// only lists are supported for now.
String innerType = type.substring(5, type.length() - 1);
return getOneOfTypesList(innerType);
} else {
Expand All @@ -255,7 +260,11 @@ private Set<String> getOneOfType(String type) {

private Set<String> getOneOfTypesList(String type) {
if (oneOfs.containsKey(type)) {
return oneOfs.get(type).types.stream().map(e -> "List<" + e + ">").collect(Collectors.toSet());
return oneOfs
.get(type)
.types.stream()
.map(e -> "List<" + e + ">")
.collect(Collectors.toSet());
} else {
return Collections.singleton("List<" + type + ">");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ public String toEnumVarName(String value, String datatype) {
@Override
public String toVarName(String name) {
String newName = super.toVarName(name);
if (StringUtils.isAllUpperCase(newName)) { // e.g. LTE, GT.
if (StringUtils.isAllUpperCase(newName)) {
// e.g. LTE, GT.
return StringUtils.lowerCase(newName);
}
return newName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,10 @@ protected void postProcessEnumVars(List<Map<String, Object>> enumVars) {
Collections.reverse(enumVars);
enumVars.forEach(v -> {
String name = (String) v.get("name");
long count = enumVars.stream().filter(v1 -> ((String) v1.get("name")).equalsIgnoreCase(name)).count();
long count = enumVars
.stream()
.filter(v1 -> ((String) v1.get("name")).equalsIgnoreCase(name))
.count();
if (count > 1L) {
String uniqueEnumName = this.getUniqueEnumName(name, enumVars);
Object var10001 = v.get("name");
Expand All @@ -221,7 +224,10 @@ protected void postProcessEnumVars(List<Map<String, Object>> enumVars) {
}

private String getUniqueEnumName(String name, List<Map<String, Object>> enumVars) {
long count = enumVars.stream().filter(v -> ((String) v.get("name")).equalsIgnoreCase(name)).count();
long count = enumVars
.stream()
.filter(v -> ((String) v.get("name")).equalsIgnoreCase(name))
.count();
return count > 1L ? this.getUniqueEnumName(name + "Alt", enumVars) : name;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,9 @@ public String getTypeDeclaration(Schema p) {
// additionalproperties: true
Schema<?> inner = ModelUtils.getAdditionalProperties(target);
if (inner == null) {
Logger.getGlobal()
.warning("`" + p.getName() + "` (map property) does not have a proper inner type defined. Default to" + " type:string");
Logger.getGlobal().warning(
"`" + p.getName() + "` (map property) does not have a proper inner type defined. Default to" + " type:string"
);
inner = new StringSchema().description("TODO default missing map inner type to string");
p.setAdditionalProperties(inner);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public DynamicTemplateLambda(DefaultCodegen generator) {
@Override
public void execute(Template.Fragment fragment, Writer writer) throws IOException {
Map<String, Object> context = (Map<String, Object>) fragment.context();
for (int contextIndex = 1;; contextIndex++) {
for (int contextIndex = 1; ; contextIndex++) {
try {
Map<String, Object> parent = (Map<String, Object>) fragment.context(contextIndex);
parent.forEach((key, value) -> context.putIfAbsent(key, value));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,11 @@ private void handleModel(
"' not found in '" +
paramName +
"'. Available properties are: " +
spec.getVars().stream().map(v -> v.baseName).collect(Collectors.joining(", ")) +
spec
.getVars()
.stream()
.map(v -> v.baseName)
.collect(Collectors.joining(", ")) +
(spec.getAdditionalPropertiesIsAnyType() ? " (and any additional properties)" : "") +
". Or you might have a type conflict in the spec for '" +
baseType +
Expand All @@ -415,7 +419,11 @@ private void handleModel(

if (language.equals("swift")) {
// Store ordered params from the spec
var orderedParams = spec.getVars().stream().map(v -> v.baseName).toList();
var orderedParams = spec
.getVars()
.stream()
.map(v -> v.baseName)
.toList();

// Create a map to store the indices of each string in orderedParams
Map<String, Integer> indexMap = IntStream.range(0, orderedParams.size())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ public void run(Map<String, CodegenModel> models, Map<String, CodegenOperation>
var isNotTestable =
step.type != null &&
step.type.equals("method") &&
((List<Map<String, Object>>) stepOut.getOrDefault("parametersWithDataType", new ArrayList<>())).stream()
.anyMatch(item -> (boolean) item.getOrDefault("isNullObject", false) || (boolean) item.getOrDefault("isNull", false));
((List<Map<String, Object>>) stepOut.getOrDefault("parametersWithDataType", new ArrayList<>())).stream().anyMatch(
item -> (boolean) item.getOrDefault("isNullObject", false) || (boolean) item.getOrDefault("isNull", false)
);
if (isNotTestable) {
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@ public void run(Map<String, CodegenModel> models, Map<String, CodegenOperation>
blocks.add(testObj);

// extract e2e
List<Map<String, Object>> e2e = tests.stream().filter(t -> t.get("response") != null).toList();
List<Map<String, Object>> e2e = tests
.stream()
.filter(t -> t.get("response") != null)
.toList();
if (e2e.size() > 0) {
Map<String, Object> e2eObj = new HashMap<>();
e2eObj.put("tests", e2e);
Expand Down
Loading