Skip to content

Commit 3d03290

Browse files
authored
Upgrade DTOs to the latest open API spec (#178)
* Upgrade DTOs to the latest open API spec * Add missing DTO mapping * Add missing DTO mapping * fix ban-related integration tests * Upgrade DTOs to the latest openAPI spec * Upgrade DTOs to the latest NSwag version * Fix field type * update MemberCount from DTOs + fix event type + cleanup
1 parent a8da04c commit 3d03290

847 files changed

Lines changed: 8889 additions & 11172 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Assets/Plugins/StreamChat/Core/InternalDTO/Client.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Assets/Plugins/StreamChat/Core/InternalDTO/Events/AnyEventInternalDTO.cs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//----------------------
22
// <auto-generated>
3-
// Generated using the NSwag toolchain v13.15.5.0 (NJsonSchema v10.6.6.0 (Newtonsoft.Json v9.0.0.0)) (http://NSwag.org)
3+
// Generated using the NSwag toolchain v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
44
// </auto-generated>
55
//----------------------
66

@@ -13,21 +13,19 @@ namespace StreamChat.Core.InternalDTO.Events
1313
{
1414
using System = global::System;
1515

16-
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.5.0 (NJsonSchema v10.6.6.0 (Newtonsoft.Json v9.0.0.0))")]
16+
/// <summary>
17+
/// The discriminator object for all websocket events, it maps events' payload to the final type
18+
/// </summary>
19+
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
1720
internal partial class AnyEventInternalDTO
1821
{
19-
[Newtonsoft.Json.JsonProperty("created_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
20-
public System.DateTimeOffset CreatedAt { get; set; }
2122

22-
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
23-
public string Type { get; set; } = "any";
24-
25-
private System.Collections.Generic.Dictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
23+
private System.Collections.Generic.Dictionary<string, object> _additionalProperties;
2624

2725
[Newtonsoft.Json.JsonExtensionData]
2826
public System.Collections.Generic.Dictionary<string, object> AdditionalProperties
2927
{
30-
get { return _additionalProperties; }
28+
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); }
3129
set { _additionalProperties = value; }
3230
}
3331

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
//----------------------
2+
// <auto-generated>
3+
// Generated using the NSwag toolchain v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
4+
// </auto-generated>
5+
//----------------------
6+
7+
8+
using StreamChat.Core.InternalDTO.Responses;
9+
using StreamChat.Core.InternalDTO.Requests;
10+
using StreamChat.Core.InternalDTO.Models;
11+
12+
namespace StreamChat.Core.InternalDTO.Events
13+
{
14+
using System = global::System;
15+
16+
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
17+
internal partial class CampaignCompletedEventInternalDTO
18+
{
19+
[Newtonsoft.Json.JsonProperty("campaign", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
20+
public CampaignResponseInternalDTO Campaign { get; set; }
21+
22+
[Newtonsoft.Json.JsonProperty("created_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
23+
public System.DateTimeOffset CreatedAt { get; set; }
24+
25+
[Newtonsoft.Json.JsonProperty("received_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
26+
public System.DateTimeOffset? ReceivedAt { get; set; }
27+
28+
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
29+
public string Type { get; set; } = "campaign.completed";
30+
31+
private System.Collections.Generic.Dictionary<string, object> _additionalProperties;
32+
33+
[Newtonsoft.Json.JsonExtensionData]
34+
public System.Collections.Generic.Dictionary<string, object> AdditionalProperties
35+
{
36+
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); }
37+
set { _additionalProperties = value; }
38+
}
39+
40+
}
41+
42+
}
43+

Assets/Plugins/StreamChat/Core/InternalDTO/Models/APNConfigFieldsInternalDTO.cs.meta renamed to Assets/Plugins/StreamChat/Core/InternalDTO/Events/CampaignCompletedEventInternalDTO.cs.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
//----------------------
2+
// <auto-generated>
3+
// Generated using the NSwag toolchain v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
4+
// </auto-generated>
5+
//----------------------
6+
7+
8+
using StreamChat.Core.InternalDTO.Responses;
9+
using StreamChat.Core.InternalDTO.Requests;
10+
using StreamChat.Core.InternalDTO.Models;
11+
12+
namespace StreamChat.Core.InternalDTO.Events
13+
{
14+
using System = global::System;
15+
16+
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
17+
internal partial class CampaignStartedEventInternalDTO
18+
{
19+
[Newtonsoft.Json.JsonProperty("campaign", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
20+
public CampaignResponseInternalDTO Campaign { get; set; }
21+
22+
[Newtonsoft.Json.JsonProperty("created_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
23+
public System.DateTimeOffset CreatedAt { get; set; }
24+
25+
[Newtonsoft.Json.JsonProperty("received_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
26+
public System.DateTimeOffset? ReceivedAt { get; set; }
27+
28+
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
29+
public string Type { get; set; } = "campaign.started";
30+
31+
private System.Collections.Generic.Dictionary<string, object> _additionalProperties;
32+
33+
[Newtonsoft.Json.JsonExtensionData]
34+
public System.Collections.Generic.Dictionary<string, object> AdditionalProperties
35+
{
36+
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); }
37+
set { _additionalProperties = value; }
38+
}
39+
40+
}
41+
42+
}
43+

Assets/Plugins/StreamChat/Core/InternalDTO/Events/WSClientEventInternalDTO.cs.meta renamed to Assets/Plugins/StreamChat/Core/InternalDTO/Events/CampaignStartedEventInternalDTO.cs.meta

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

Assets/Plugins/StreamChat/Core/InternalDTO/Events/ChannelCreatedEventInternalDTO.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//----------------------
22
// <auto-generated>
3-
// Generated using the NSwag toolchain v13.15.5.0 (NJsonSchema v10.6.6.0 (Newtonsoft.Json v9.0.0.0)) (http://NSwag.org)
3+
// Generated using the NSwag toolchain v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
44
// </auto-generated>
55
//----------------------
66

@@ -13,7 +13,7 @@ namespace StreamChat.Core.InternalDTO.Events
1313
{
1414
using System = global::System;
1515

16-
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.5.0 (NJsonSchema v10.6.6.0 (Newtonsoft.Json v9.0.0.0))")]
16+
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
1717
internal partial class ChannelCreatedEventInternalDTO
1818
{
1919
[Newtonsoft.Json.JsonProperty("created_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
@@ -22,12 +22,12 @@ internal partial class ChannelCreatedEventInternalDTO
2222
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2323
public string Type { get; set; } = "channel.created";
2424

25-
private System.Collections.Generic.Dictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
25+
private System.Collections.Generic.Dictionary<string, object> _additionalProperties;
2626

2727
[Newtonsoft.Json.JsonExtensionData]
2828
public System.Collections.Generic.Dictionary<string, object> AdditionalProperties
2929
{
30-
get { return _additionalProperties; }
30+
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); }
3131
set { _additionalProperties = value; }
3232
}
3333

Assets/Plugins/StreamChat/Core/InternalDTO/Events/ChannelDeletedEventInternalDTO.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//----------------------
22
// <auto-generated>
3-
// Generated using the NSwag toolchain v13.15.5.0 (NJsonSchema v10.6.6.0 (Newtonsoft.Json v9.0.0.0)) (http://NSwag.org)
3+
// Generated using the NSwag toolchain v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
44
// </auto-generated>
55
//----------------------
66

@@ -13,7 +13,7 @@ namespace StreamChat.Core.InternalDTO.Events
1313
{
1414
using System = global::System;
1515

16-
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.5.0 (NJsonSchema v10.6.6.0 (Newtonsoft.Json v9.0.0.0))")]
16+
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
1717
internal partial class ChannelDeletedEventInternalDTO
1818
{
1919
[Newtonsoft.Json.JsonProperty("channel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
@@ -22,6 +22,9 @@ internal partial class ChannelDeletedEventInternalDTO
2222
[Newtonsoft.Json.JsonProperty("channel_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2323
public string ChannelId { get; set; }
2424

25+
[Newtonsoft.Json.JsonProperty("channel_member_count", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
26+
public int ChannelMemberCount { get; set; }
27+
2528
[Newtonsoft.Json.JsonProperty("channel_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2629
public string ChannelType { get; set; }
2730

@@ -37,12 +40,12 @@ internal partial class ChannelDeletedEventInternalDTO
3740
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
3841
public string Type { get; set; } = "channel.deleted";
3942

40-
private System.Collections.Generic.Dictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
43+
private System.Collections.Generic.Dictionary<string, object> _additionalProperties;
4144

4245
[Newtonsoft.Json.JsonExtensionData]
4346
public System.Collections.Generic.Dictionary<string, object> AdditionalProperties
4447
{
45-
get { return _additionalProperties; }
48+
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); }
4649
set { _additionalProperties = value; }
4750
}
4851

Assets/Plugins/StreamChat/Core/InternalDTO/Events/ChannelFrozenEventInternalDTO.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//----------------------
22
// <auto-generated>
3-
// Generated using the NSwag toolchain v13.15.5.0 (NJsonSchema v10.6.6.0 (Newtonsoft.Json v9.0.0.0)) (http://NSwag.org)
3+
// Generated using the NSwag toolchain v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
44
// </auto-generated>
55
//----------------------
66

@@ -13,7 +13,7 @@ namespace StreamChat.Core.InternalDTO.Events
1313
{
1414
using System = global::System;
1515

16-
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.5.0 (NJsonSchema v10.6.6.0 (Newtonsoft.Json v9.0.0.0))")]
16+
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
1717
internal partial class ChannelFrozenEventInternalDTO
1818
{
1919
[Newtonsoft.Json.JsonProperty("channel_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
@@ -31,12 +31,12 @@ internal partial class ChannelFrozenEventInternalDTO
3131
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
3232
public string Type { get; set; } = "channel.frozen";
3333

34-
private System.Collections.Generic.Dictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
34+
private System.Collections.Generic.Dictionary<string, object> _additionalProperties;
3535

3636
[Newtonsoft.Json.JsonExtensionData]
3737
public System.Collections.Generic.Dictionary<string, object> AdditionalProperties
3838
{
39-
get { return _additionalProperties; }
39+
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); }
4040
set { _additionalProperties = value; }
4141
}
4242

Assets/Plugins/StreamChat/Core/InternalDTO/Events/ChannelHiddenEventInternalDTO.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//----------------------
22
// <auto-generated>
3-
// Generated using the NSwag toolchain v13.15.5.0 (NJsonSchema v10.6.6.0 (Newtonsoft.Json v9.0.0.0)) (http://NSwag.org)
3+
// Generated using the NSwag toolchain v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
44
// </auto-generated>
55
//----------------------
66

@@ -13,7 +13,7 @@ namespace StreamChat.Core.InternalDTO.Events
1313
{
1414
using System = global::System;
1515

16-
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.15.5.0 (NJsonSchema v10.6.6.0 (Newtonsoft.Json v9.0.0.0))")]
16+
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")]
1717
internal partial class ChannelHiddenEventInternalDTO
1818
{
1919
[Newtonsoft.Json.JsonProperty("channel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
@@ -22,6 +22,9 @@ internal partial class ChannelHiddenEventInternalDTO
2222
[Newtonsoft.Json.JsonProperty("channel_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2323
public string ChannelId { get; set; }
2424

25+
[Newtonsoft.Json.JsonProperty("channel_member_count", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
26+
public int ChannelMemberCount { get; set; }
27+
2528
[Newtonsoft.Json.JsonProperty("channel_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
2629
public string ChannelType { get; set; }
2730

@@ -40,12 +43,12 @@ internal partial class ChannelHiddenEventInternalDTO
4043
[Newtonsoft.Json.JsonProperty("user", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
4144
public UserObjectInternalDTO User { get; set; }
4245

43-
private System.Collections.Generic.Dictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
46+
private System.Collections.Generic.Dictionary<string, object> _additionalProperties;
4447

4548
[Newtonsoft.Json.JsonExtensionData]
4649
public System.Collections.Generic.Dictionary<string, object> AdditionalProperties
4750
{
48-
get { return _additionalProperties; }
51+
get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); }
4952
set { _additionalProperties = value; }
5053
}
5154

0 commit comments

Comments
 (0)