The templates directory contains only our customized Java templates. Beside these customized templates,
the original templates of openapi-generator for Java are used. These can be found in the
official GitHub repo of the openapi-generator.
If you need to change something in the Java Generator, try always first to add user-defined templates, instead of overwriting existing templates. These ensure an easier upgrade process, to newer versions of the openapi-generator.
If it's required to customize the original templates, you can copy them into this directory. Try to minimize the customization as much as possible, to ensure, that we can easily upgrade to newer versions in the future.
The following templates were customized but don't need to be adjusted when updating the Java SDK generator to a new a newer upstream version:
README.mustache: This template was entirely overwritten. It has no technical impact on the Java SDK.api_test.mustache: This template had to be customized because of our changes to the DefaultApi and ApiClient classes.
The following templates were customized and need to be checked for adjustments when updating the Java SDK generator to a newer upstream version:
ApiCallback.mustache: This template was customized use theApiExceptionclass from the core module instead of the one generated by default.ApiClient.mustache: This template was customized to initialize the ApiClient with the CoreConfiguration to easily setup the KeyFlow Authentication and custom endpoints.api.mustache: This template was customized to initialize the DefaultApi with the CoreConfiguration to easily setup the KeyFlow Authentication and custom endpoints.build.gradle.mustache: This template was customized to allow the services to be subprojects in one big gradle project.
The custom templates don't need to be adjusted when updating the Java SDK generator to a new a newer upstream version.
ApiClientTest.mustache: Implements additional test cases.serviceApi.mustacheandserviceApiTest.mustache: The classes generated by this template (IaasApi,AlbApi, ...) just inherit from the correspondingDefaultApiclass. This way users of the Java SDK can use two STACKIT SDK modules for different STACKIT services within the same file without being forced to use fully qualified names for classes.