Skip to content

Commit cbffe78

Browse files
committed
adjust Java templates to:
- use CoreConfiguration for client initialisation - use ApiException from core library - import core library in each service
1 parent bab5728 commit cbffe78

File tree

5 files changed

+77
-231
lines changed

5 files changed

+77
-231
lines changed

scripts/generate-sdk/.openapi-generator-ignore-java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,12 @@ gradle.properties
1919
gradlew.bat
2020
gradlew
2121
gradle/**
22+
23+
# ApiException from core library should be used (avoid multiple ApiException imports in case different services are used at the same time)
24+
**/ApiException.java
25+
26+
# Authentication classes are not required because the KeyFlowAuth is attached as interceptor
27+
**/auth/**
28+
29+
# Service Configuration is not required. It only stores a defaultApiClient
30+
**/Configuration.java

templates/java/ApiCallback.mustache

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
{{! This template was customized to add the core ApiException class as import. }}
2+
{{! Original template: https://github.com/OpenAPITools/openapi-generator/blob/v7.14.0/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/ApiCallback.mustache }}
13
{{>licenseInfo}}
24

35
package {{invokerPackage}};
46

57
import java.io.IOException;
8+
import cloud.stackit.sdk.core.exception.ApiException;
69

710
import java.util.Map;
811
import java.util.List;

0 commit comments

Comments
 (0)