Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/maven/commons-io-commons-io-2.16.1
Browse files Browse the repository at this point in the history
  • Loading branch information
renaudhartert-db authored Nov 6, 2024
2 parents 78cce9c + f04f6cb commit ce8dda1
Show file tree
Hide file tree
Showing 1,312 changed files with 46,700 additions and 5,754 deletions.
27 changes: 5 additions & 22 deletions .codegen.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,17 @@
{
"formatter": "mvn spotless:apply",
"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"
},
"mode": "java_v0",
"changelog_config": ".codegen/changelog_config.yml",
"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>",
"databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java": "private static final String version = \"$VERSION\";",
"examples/docs/pom.xml": "<artifactId>databricks-sdk-java</artifactId>\n <version>$VERSION</version>",
"examples/spring-boot-oauth-u2m-demo/pom.xml": "<artifactId>databricks-sdk-java</artifactId>\n <version>$VERSION</version>"
"examples/spring-boot-oauth-u2m-demo/pom.xml": "<artifactId>databricks-sdk-java</artifactId>\n <version>$VERSION</version>",
"shaded/pom.xml": "<properties>\n <sdk.version>$VERSION</sdk.version>"
},
"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"]
}
}
2 changes: 1 addition & 1 deletion .codegen/_openapi_sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d38528c3e47dd81c9bdbd918272a3e49d36e09ce
cf9c61453990df0f9453670f2fe68e1b128647a2
75 changes: 0 additions & 75 deletions .codegen/account.java.tmpl

This file was deleted.

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

This file was deleted.

44 changes: 38 additions & 6 deletions .codegen/changelog.md.tmpl
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Version changelog

## {{.Version}}
{{- range .GroupChanges}}

{{range .Changes -}}
### {{.Type.Message}}
{{range .Changes}}
* {{.}}.
{{end}}{{- if .ApiChanges}}
API Changes:
{{range .ApiChanges}}
* {{.Action}} {{template "what" .}}{{if .Extra}} {{.Extra}}{{with .Other}} {{template "what" .}}{{end}}{{end}}.
{{- end}}
{{end}}
{{if .ApiChanges}}
### API Changes:
{{range .ApiChanges.GroupDiff}}
* {{.Action}} {{template "group-what" .}}{{if .Extra}} {{.Extra}}{{with .Other}} {{template "other-what" .}}{{end}}{{end}}.
{{- end}}

OpenAPI SHA: {{.Sha}}, Date: {{.Changed}}
Expand All @@ -21,7 +25,35 @@ Dependency updates:

## {{.PrevVersion}}

{{- define "what" -}}
{{- define "group-what" -}}
{{if gt (len .Changes) 1 -}} {{template "single-what" .Changes.First}}{{end -}}
{{range .Changes.Middle -}}, {{template "single-what" .}}{{end -}}
{{if gt (len .Changes) 1}} and {{end}}{{template "single-what" .Changes.Last}}{{template "suffix-what" .}}
{{- end -}}

{{- define "single-what" -}}
{{if eq .X "package" -}}
`com.databricks.sdk.service.{{.Package.Name}}`
{{- else if eq .X "service" -}}
{{template "service" .Service}}
{{- else if eq .X "method" -}}
`{{.Method.CamelName}}()`
{{- else if eq .X "entity" -}}
{{template "entity" .Entity}}
{{- else if eq .X "field" -}}
`{{.Field.CamelName}}`
{{- end}}
{{- end -}}

{{- define "suffix-what" -}}
{{if eq .Type "package" }} package{{if gt (len .Changes) 1}}s{{end}}
{{- else if eq .Type "method" }} method{{if gt (len .Changes) 1}}s{{end}} for {{template "service" .Parent.Service}}
{{- else if eq .Type "entity" }} class{{if gt (len .Changes) 1}}es{{end}}
{{- else if eq .Type "field" }} field{{if gt (len .Changes) 1}}s{{end}} for {{template "entity" .Parent.Entity}}
{{- end}}
{{- end -}}

{{- define "other-what" -}}
{{if eq .X "package" -}}
`com.databricks.sdk.service.{{.Package.Name}}` package
{{- else if eq .X "service" -}}
Expand Down
Loading

0 comments on commit ce8dda1

Please sign in to comment.