Skip to content

Commit

Permalink
feat(clients): add missing clients (#2479)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts authored Jan 5, 2024
1 parent a27d31b commit 461796b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/.cache_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.3
1.0.4
58 changes: 20 additions & 38 deletions config/openapitools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
"version": "7.2.0",
"generators": {
"javascript-algoliasearch": {
"output": "#{cwd}/clients/algoliasearch-client-javascript/packages/algoliasearch",
"reservedWordsMappings": "queryParameters=queryParameters,requestOptions=requestOptions,delete=delete"
"output": "#{cwd}/clients/algoliasearch-client-javascript/packages/algoliasearch"
},
"javascript-search": {
"output": "#{cwd}/clients/algoliasearch-client-javascript/packages/client-search",
"reservedWordsMappings": "queryParameters=queryParameters,requestOptions=requestOptions,delete=delete"
"output": "#{cwd}/clients/algoliasearch-client-javascript/packages/client-search"
},
"javascript-recommend": {
"output": "#{cwd}/clients/algoliasearch-client-javascript/packages/recommend",
"reservedWordsMappings": "queryParameters=queryParameters,delete=delete"
"output": "#{cwd}/clients/algoliasearch-client-javascript/packages/recommend"
},
"javascript-personalization": {
"output": "#{cwd}/clients/algoliasearch-client-javascript/packages/client-personalization"
Expand Down Expand Up @@ -56,6 +53,9 @@
"java-query-suggestions": {
"output": "#{cwd}/clients/algoliasearch-client-java"
},
"java-ingestion": {
"output": "#{cwd}/clients/algoliasearch-client-java"
},
"java-monitoring": {
"output": "#{cwd}/clients/algoliasearch-client-java"
},
Expand All @@ -80,56 +80,38 @@
"php-query-suggestions": {
"output": "#{cwd}/clients/algoliasearch-client-php"
},
"php-ingestion": {
"output": "#{cwd}/clients/algoliasearch-client-php"
},
"php-monitoring": {
"output": "#{cwd}/clients/algoliasearch-client-php"
},
"go-analytics": {
"output": "#{cwd}/clients/algoliasearch-client-go",
"additionalProperties": {
"packageName": "analytics"
}
"output": "#{cwd}/clients/algoliasearch-client-go"
},
"go-abtesting": {
"output": "#{cwd}/clients/algoliasearch-client-go"
},
"go-ingestion": {
"output": "#{cwd}/clients/algoliasearch-client-go",
"additionalProperties": {
"packageName": "ingestion"
}
"output": "#{cwd}/clients/algoliasearch-client-go"
},
"go-insights": {
"output": "#{cwd}/clients/algoliasearch-client-go",
"additionalProperties": {
"packageName": "insights"
}
"output": "#{cwd}/clients/algoliasearch-client-go"
},
"go-query-suggestions": {
"output": "#{cwd}/clients/algoliasearch-client-go",
"additionalProperties": {
"packageName": "suggestions"
}
"output": "#{cwd}/clients/algoliasearch-client-go"
},
"go-personalization": {
"output": "#{cwd}/clients/algoliasearch-client-go",
"additionalProperties": {
"packageName": "personalization"
}
"output": "#{cwd}/clients/algoliasearch-client-go"
},
"go-recommend": {
"output": "#{cwd}/clients/algoliasearch-client-go",
"additionalProperties": {
"packageName": "recommend"
}
"output": "#{cwd}/clients/algoliasearch-client-go"
},
"go-search": {
"output": "#{cwd}/clients/algoliasearch-client-go",
"additionalProperties": {
"packageName": "search"
}
"output": "#{cwd}/clients/algoliasearch-client-go"
},
"go-monitoring": {
"output": "#{cwd}/clients/algoliasearch-client-go",
"additionalProperties": {
"packageName": "monitoring"
}
"output": "#{cwd}/clients/algoliasearch-client-go"
},
"kotlin-search": {
"output": "#{cwd}/clients/algoliasearch-client-kotlin"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public String getName() {
@Override
public void processOpts() {
String client = (String) additionalProperties.get("client");

additionalProperties.put("packageName", client.equals("query-suggestions") ? "suggestions" : client);
additionalProperties.put("enumClassPrefix", true);
additionalProperties.put("isSearchClient", client.equals("search"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public void processOpts() {
setSupportsES6(true);
setModelPropertyNaming("original");
setApiPackage("src");
reservedWordsMappings.put("queryParameters", "queryParameters");
reservedWordsMappings.put("requestOptions", "requestOptions");
reservedWordsMappings.put("delete", "delete");

// Generation notice, added on every generated files
Helpers.setGenerationBanner(additionalProperties);
Expand Down
2 changes: 1 addition & 1 deletion templates/java/tests/generateParams.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{{#isObject}}
{{{objectName}}} {{{key}}}{{suffix}} = new {{{objectName}}}();
{
{{#value}}{{> generateParams}}{{#isAdditionalProperty}}{{parent}}{{parentSuffix}}.setAdditionalProperty("{{{key}}}", {{> maybeConvertOneOf}});{{/isAdditionalProperty}}{{^isAdditionalProperty}}{{parent}}{{parentSuffix}}.set{{#lambda.titlecase}}{{{key}}}{{/lambda.titlecase}}({{> maybeConvertOneOf}});{{/isAdditionalProperty}}{{/value}}
{{#value}}{{> generateParams}}{{#isAdditionalProperty}}{{parent}}{{parentSuffix}}.setAdditionalProperty("{{{key}}}", {{> maybeConvertOneOf}});{{/isAdditionalProperty}}{{^isAdditionalProperty}}{{parent}}{{parentSuffix}}.set{{#lambda.pascalcase}}{{{key}}}{{/lambda.pascalcase}}({{> maybeConvertOneOf}});{{/isAdditionalProperty}}{{/value}}
}
{{/isObject}}
{{#isFreeFormObject}}
Expand Down

0 comments on commit 461796b

Please sign in to comment.