Skip to content

Commit

Permalink
fix(java): move code to src folder APIC-411 (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
millotp authored Apr 21, 2022
1 parent cbf57aa commit ed33e02
Show file tree
Hide file tree
Showing 283 changed files with 19 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/.cache_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.0.4.3
8.0.5
12 changes: 6 additions & 6 deletions clients/algoliasearch-client-java-2/.openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ pom.xml
gradle*

# Selective source file
algoliasearch-core/com/algolia/auth/**
algoliasearch-core/com/algolia/ApiException.java
algoliasearch-core/com/algolia/Configuration.java
algoliasearch-core/com/algolia/Server*.java
algoliasearch-core/com/algolia/StringUtil.java
algoliasearch-core/com/algolia/GzipRequestInterceptor.java
algoliasearch-core/src/com/algolia/auth/**
algoliasearch-core/src/com/algolia/ApiException.java
algoliasearch-core/src/com/algolia/Configuration.java
algoliasearch-core/src/com/algolia/Server*.java
algoliasearch-core/src/com/algolia/StringUtil.java
algoliasearch-core/src/com/algolia/GzipRequestInterceptor.java
4 changes: 2 additions & 2 deletions config/clients.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"java": {
"folder": "clients/algoliasearch-client-java-2",
"mainPackage": "java-search",
"modelFolder": "algoliasearch-core/com/algolia/model",
"apiFolder": "algoliasearch-core/com/algolia/api",
"modelFolder": "algoliasearch-core/src/com/algolia/model",
"apiFolder": "algoliasearch-core/src/com/algolia/api",
"customGenerator": "algolia-java",
"tests": {
"extension": ".test.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,15 @@ public Map<String, Object> postProcessAllModels(Map<String, Object> objs) {
List<HashMap<String, String>> listOneOf = new ArrayList();

for (String iterateModel : model.oneOf) {
HashMap<String, String> hashMapOneOf = new HashMap();
HashMap<String, String> oneOfModel = new HashMap();

hashMapOneOf.put("type", iterateModel);
hashMapOneOf.put(
oneOfModel.put("type", iterateModel);
oneOfModel.put(
"name",
iterateModel.replace("<", "").replace(">", "")
);

listOneOf.add(hashMapOneOf);
listOneOf.add(oneOfModel);
}

model.vendorExtensions.put("x-is-one-of-interface", true);
Expand All @@ -189,7 +189,7 @@ public Map<String, Object> postProcessSupportingFileData(
supportingFiles.add(
new SupportingFile(
"EchoResponse.mustache",
"algoliasearch-core/com/algolia/utils/echo",
sourceFolder + "/com/algolia/utils/echo",
"EchoResponse" + clientName + ".java"
)
);
Expand Down Expand Up @@ -222,16 +222,13 @@ public String getHelp() {

@Override
public void processOpts() {
super.processOpts();

// generator specific options
setDateLibrary("java8");
setSourceFolder("algoliasearch-core");
setSourceFolder("algoliasearch-core/src");
setInvokerPackage("com.algolia");
setApiNameSuffix(Utils.API_SUFFIX);

additionalProperties.put("apiNameSuffix", Utils.API_SUFFIX);
additionalProperties.put("java8", true);
additionalProperties.put("sourceFolder", "algoliasearch-core");
super.processOpts();

// Prevent all useless file to generate
apiTestTemplateFiles.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,11 @@ public Map<String, Object> postProcessOperationsWithModels(

@Override
public void processOpts() {
super.processOpts();

// generator specific options
setApiNameSuffix(Utils.API_SUFFIX);
setParameterNamingConvention("camelCase");
additionalProperties.put("apiNameSuffix", Utils.API_SUFFIX);

super.processOpts();

// Remove base template as we want to change its path
supportingFiles.removeIf(file ->
Expand Down

0 comments on commit ed33e02

Please sign in to comment.