Skip to content

Commit 3d071d2

Browse files
committed
fix(generator) Add override for _types.EpochTime as int64
Include a note on handling generic type parameters to improve type generation. Relates: elastic/elasticsearch-specification#5097
1 parent 337f6d3 commit 3d071d2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/generator/internal/codegen/generator.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ var overrides = map[string]string{
5454
// https://github.com/andrewkroh/go-ingest-node/issues/15.
5555
"_types.Script": "string",
5656
"_types.ScriptSource": "string",
57+
58+
// NOTE: The generator should ideally be looking at the generic type
59+
// parameters to determine the underlying data type and create a specific
60+
// Go type like EpochTimeMillis.
61+
// https://github.com/elastic/elasticsearch-specification/commit/2154fc3cce09605c6fe28523be66686a1c6fe056#diff-dd279dbec99794cf0554bb4ab6cfa07b69739d902bb5f178623e0a639087f0e7R120740-R120753
62+
"_types.EpochTime": "int64",
5763
}
5864

5965
// acronyms is a set of acronyms that should be capitalized in identifiers.

0 commit comments

Comments
 (0)