Skip to content

Commit

Permalink
Add local array definition overrides for client.ip, destination.ip, s…
Browse files Browse the repository at this point in the history
…erver.ip and source.ip as a result of missing definitions in ECS 1.5
  • Loading branch information
codebrain committed Mar 16, 2020
1 parent 10b142a commit dc0d44f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Elastic.CommonSchema/Types.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ public class Client
/// </summary>
/// <remarks>(ECS Core)</remarks>
[DataMember(Name = "ip")]
public string Ip { get; set; }
public string[] Ip { get; set; }

/// <summary>
/// Port of the client.
Expand Down Expand Up @@ -868,7 +868,7 @@ public class Destination
/// </summary>
/// <remarks>(ECS Core)</remarks>
[DataMember(Name = "ip")]
public string Ip { get; set; }
public string[] Ip { get; set; }

/// <summary>
/// Port of the destination.
Expand Down Expand Up @@ -3738,7 +3738,7 @@ public class Server
/// </summary>
/// <remarks>(ECS Core)</remarks>
[DataMember(Name = "ip")]
public string Ip { get; set; }
public string[] Ip { get; set; }

/// <summary>
/// Port of the server.
Expand Down Expand Up @@ -3942,7 +3942,7 @@ public class Source
/// </summary>
/// <remarks>(ECS Core)</remarks>
[DataMember(Name = "ip")]
public string Ip { get; set; }
public string[] Ip { get; set; }

/// <summary>
/// Port of the source.
Expand Down
4 changes: 4 additions & 0 deletions src/Generator/SchemaExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public static string ClrType(this Field value)
{
var isArray = value.IsArray() ||
value.FlatName == "user.id" ||
value.FlatName == "client.ip" ||
value.FlatName == "destination.ip" ||
value.FlatName == "server.ip" ||
value.FlatName == "source.ip" ||
value.FlatName == "registry.data.strings";

// Special cases.
Expand Down

0 comments on commit dc0d44f

Please sign in to comment.