Skip to content

Commit

Permalink
[Internal] Move templates in the code generator (#373)
Browse files Browse the repository at this point in the history
## Changes
<!-- Summary of your changes that are easy to understand -->
Move templates in the code generator.

## Tests
<!-- How is this tested? -->
The generator is working correctly with the new configuration.
  • Loading branch information
parthban-db authored Oct 31, 2024
1 parent a239cae commit a1460c5
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 681 deletions.
24 changes: 2 additions & 22 deletions .codegen.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
{
"formatter": "mvn spotless:apply",
"mode": "java_v0",
"changelog_config": ".codegen/changelog_config.yml",
"template_libraries": [
".codegen/lib.tmpl"
],
"types": {
".codegen/model.java.tmpl": "databricks-sdk-java/src/main/java/com/databricks/sdk/service/{{.Package.Name}}/{{.PascalName}}.java"
},
"services": {
".codegen/interface.java.tmpl": "databricks-sdk-java/src/main/java/com/databricks/sdk/service/{{.Package.Name}}/{{.PascalName}}Service.java",
".codegen/api.java.tmpl": "databricks-sdk-java/src/main/java/com/databricks/sdk/service/{{.Package.Name}}/{{.PascalName}}API.java",
".codegen/impl.java.tmpl": "databricks-sdk-java/src/main/java/com/databricks/sdk/service/{{.Package.Name}}/{{.PascalName}}Impl.java"
},
"exception_types": {
".codegen/exception.java.tmpl": "databricks-sdk-java/src/main/java/com/databricks/sdk/core/error/platform/{{.PascalName}}.java"
},
"batch": {
".codegen/workspace.java.tmpl": "databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java",
".codegen/account.java.tmpl": "databricks-sdk-java/src/main/java/com/databricks/sdk/AccountClient.java",
".codegen/error-mapper.java.tmpl": "databricks-sdk-java/src/main/java/com/databricks/sdk/core/error/ErrorMapper.java",
".codegen/error-overrides.java.tmpl": "databricks-sdk-java/src/main/java/com/databricks/sdk/core/error/ErrorOverrides.java"
},
"version": {
"pom.xml": "<artifactId>databricks-sdk-parent</artifactId>\n <version>$VERSION</version>",
"databricks-sdk-java/pom.xml": "<artifactId>databricks-sdk-parent</artifactId>\n <version>$VERSION</version>",
Expand All @@ -32,6 +12,6 @@
"toolchain": {
"require": ["mvn", "java"],
"setup": ["rm -rf databricks-sdk-java/src/main/java/com/databricks/sdk/service"],
"post_generate": ["mvn --errors clean test"]
"post_generate": ["mvn spotless:apply","mvn --errors clean test"]
}
}
75 changes: 0 additions & 75 deletions .codegen/account.java.tmpl

This file was deleted.

219 changes: 0 additions & 219 deletions .codegen/api.java.tmpl

This file was deleted.

15 changes: 0 additions & 15 deletions .codegen/error-mapper.java.tmpl

This file was deleted.

24 changes: 0 additions & 24 deletions .codegen/error-overrides.java.tmpl

This file was deleted.

25 changes: 0 additions & 25 deletions .codegen/exception.java.tmpl

This file was deleted.

Loading

0 comments on commit a1460c5

Please sign in to comment.