Skip to content

Commit 3c9daf5

Browse files
authored
fix(azure)!: Rename e_tag to etag (#5902)
1 parent 8977bb6 commit 3c9daf5

5 files changed

Lines changed: 10 additions & 4 deletions

File tree

plugins/source/azure/codegen2/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ func initTable(parent *recipes.Table, r *recipes.Table) error {
118118
codegen.WithSkipFields(r.SkipFields),
119119
codegen.WithExtraColumns(r.ExtraColumns),
120120
codegen.WithPKColumns("id"),
121+
codegen.WithNameTransformer(func(f reflect.StructField) (string, error) {
122+
if f.Name == "ETag" {
123+
return "etag", nil
124+
}
125+
return codegen.DefaultNameTransformer(f)
126+
}),
121127
}
122128
tableName := fmt.Sprintf("azure_%s_%s", r.PackageName, r.Name)
123129
if len(tableName) > 63 {

plugins/source/azure/docs/tables/azure_costmanagement_views.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The primary key for this table is **id**.
1111
|_cq_id|UUID|
1212
|_cq_parent_id|UUID|
1313
|subscription_id|String|
14-
|e_tag|String|
14+
|etag|String|
1515
|properties|JSON|
1616
|id (PK)|String|
1717
|name|String|

plugins/source/azure/docs/tables/azure_datafactory_factories.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The primary key for this table is **id**.
1616
|location|String|
1717
|properties|JSON|
1818
|tags|JSON|
19-
|e_tag|String|
19+
|etag|String|
2020
|id (PK)|String|
2121
|name|String|
2222
|type|String|

plugins/source/azure/resources/services/costmanagement/views.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/source/azure/resources/services/datafactory/factories.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)