Skip to content

Commit 9b5ddee

Browse files
committed
fix: Fixed rare issue with conflict types inside AnyOf constructors
1 parent f61ab37 commit 9b5ddee

File tree

487 files changed

+1725
-1827
lines changed

Some content is hidden

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

487 files changed

+1725
-1827
lines changed

src/libs/AutoSDK/Sources/Sources.Models.AnyOf.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ namespace {anyOfData.Namespace}
9292
x.Type.CSharpTypeWithoutNullability.StartsWith("global::System.Collections.Generic.IList", StringComparison.Ordinal) != true &&
9393
x.Type.CSharpTypeWithoutNullability != "object"? $@"
9494
{string.Empty.ToXmlDocumentationSummary(level: 8)}
95-
public static implicit operator {className}({x.Type.CSharpTypeWithoutNullability} value) => new {className}(value);
95+
public static implicit operator {className}({x.Type.CSharpTypeWithoutNullability} value) => new {className}(({x.Type.CSharpTypeWithNullability})value);
9696
9797
{string.Empty.ToXmlDocumentationSummary(level: 8)}
9898
public static implicit operator {x.Type.CSharpTypeWithNullability}({className} @this) => @this.{x.Name};

src/tests/AutoSDK.SnapshotTests/Snapshots/ai21/NewtonsoftJson/_#AnyOf.2.g.verified.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace G
2929
/// <summary>
3030
///
3131
/// </summary>
32-
public static implicit operator AnyOf<T1, T2>(T1 value) => new AnyOf<T1, T2>(value);
32+
public static implicit operator AnyOf<T1, T2>(T1 value) => new AnyOf<T1, T2>((T1?)value);
3333

3434
/// <summary>
3535
///
@@ -64,7 +64,7 @@ public AnyOf(T1? value)
6464
/// <summary>
6565
///
6666
/// </summary>
67-
public static implicit operator AnyOf<T1, T2>(T2 value) => new AnyOf<T1, T2>(value);
67+
public static implicit operator AnyOf<T1, T2>(T2 value) => new AnyOf<T1, T2>((T2?)value);
6868

6969
/// <summary>
7070
///

src/tests/AutoSDK.SnapshotTests/Snapshots/ai21/NewtonsoftJson/_#G.Models.MessagesItem.g.verified.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace G
3535
/// <summary>
3636
///
3737
/// </summary>
38-
public static implicit operator MessagesItem(global::G.UserMessage value) => new MessagesItem(value);
38+
public static implicit operator MessagesItem(global::G.UserMessage value) => new MessagesItem((global::G.UserMessage?)value);
3939

4040
/// <summary>
4141
///
@@ -70,7 +70,7 @@ public MessagesItem(global::G.UserMessage? value)
7070
/// <summary>
7171
///
7272
/// </summary>
73-
public static implicit operator MessagesItem(global::G.AssistantMessage value) => new MessagesItem(value);
73+
public static implicit operator MessagesItem(global::G.AssistantMessage value) => new MessagesItem((global::G.AssistantMessage?)value);
7474

7575
/// <summary>
7676
///
@@ -105,7 +105,7 @@ public MessagesItem(global::G.AssistantMessage? value)
105105
/// <summary>
106106
///
107107
/// </summary>
108-
public static implicit operator MessagesItem(global::G.ToolMessage value) => new MessagesItem(value);
108+
public static implicit operator MessagesItem(global::G.ToolMessage value) => new MessagesItem((global::G.ToolMessage?)value);
109109

110110
/// <summary>
111111
///
@@ -140,7 +140,7 @@ public MessagesItem(global::G.ToolMessage? value)
140140
/// <summary>
141141
///
142142
/// </summary>
143-
public static implicit operator MessagesItem(global::G.SystemMessage value) => new MessagesItem(value);
143+
public static implicit operator MessagesItem(global::G.SystemMessage value) => new MessagesItem((global::G.SystemMessage?)value);
144144

145145
/// <summary>
146146
///

src/tests/AutoSDK.SnapshotTests/Snapshots/ai21/NewtonsoftJson/_#G.Models.QueryFilter.g.verified.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public QueryFilter(object? value)
5555
/// <summary>
5656
///
5757
/// </summary>
58-
public static implicit operator QueryFilter(global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IList<object>> value) => new QueryFilter(value);
58+
public static implicit operator QueryFilter(global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IList<object>> value) => new QueryFilter((global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IList<object>>?)value);
5959

6060
/// <summary>
6161
///
@@ -90,7 +90,7 @@ public QueryFilter(global::System.Collections.Generic.Dictionary<string, global:
9090
/// <summary>
9191
///
9292
/// </summary>
93-
public static implicit operator QueryFilter(global::System.Collections.Generic.Dictionary<string, object> value) => new QueryFilter(value);
93+
public static implicit operator QueryFilter(global::System.Collections.Generic.Dictionary<string, object> value) => new QueryFilter((global::System.Collections.Generic.Dictionary<string, object>?)value);
9494

9595
/// <summary>
9696
///

src/tests/AutoSDK.SnapshotTests/Snapshots/ai21/SystemTextJson/_#AnyOf.2.g.verified.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace G
2929
/// <summary>
3030
///
3131
/// </summary>
32-
public static implicit operator AnyOf<T1, T2>(T1 value) => new AnyOf<T1, T2>(value);
32+
public static implicit operator AnyOf<T1, T2>(T1 value) => new AnyOf<T1, T2>((T1?)value);
3333

3434
/// <summary>
3535
///
@@ -64,7 +64,7 @@ public AnyOf(T1? value)
6464
/// <summary>
6565
///
6666
/// </summary>
67-
public static implicit operator AnyOf<T1, T2>(T2 value) => new AnyOf<T1, T2>(value);
67+
public static implicit operator AnyOf<T1, T2>(T2 value) => new AnyOf<T1, T2>((T2?)value);
6868

6969
/// <summary>
7070
///

src/tests/AutoSDK.SnapshotTests/Snapshots/ai21/SystemTextJson/_#G.Models.MessagesItem.g.verified.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace G
3535
/// <summary>
3636
///
3737
/// </summary>
38-
public static implicit operator MessagesItem(global::G.UserMessage value) => new MessagesItem(value);
38+
public static implicit operator MessagesItem(global::G.UserMessage value) => new MessagesItem((global::G.UserMessage?)value);
3939

4040
/// <summary>
4141
///
@@ -70,7 +70,7 @@ public MessagesItem(global::G.UserMessage? value)
7070
/// <summary>
7171
///
7272
/// </summary>
73-
public static implicit operator MessagesItem(global::G.AssistantMessage value) => new MessagesItem(value);
73+
public static implicit operator MessagesItem(global::G.AssistantMessage value) => new MessagesItem((global::G.AssistantMessage?)value);
7474

7575
/// <summary>
7676
///
@@ -105,7 +105,7 @@ public MessagesItem(global::G.AssistantMessage? value)
105105
/// <summary>
106106
///
107107
/// </summary>
108-
public static implicit operator MessagesItem(global::G.ToolMessage value) => new MessagesItem(value);
108+
public static implicit operator MessagesItem(global::G.ToolMessage value) => new MessagesItem((global::G.ToolMessage?)value);
109109

110110
/// <summary>
111111
///
@@ -140,7 +140,7 @@ public MessagesItem(global::G.ToolMessage? value)
140140
/// <summary>
141141
///
142142
/// </summary>
143-
public static implicit operator MessagesItem(global::G.SystemMessage value) => new MessagesItem(value);
143+
public static implicit operator MessagesItem(global::G.SystemMessage value) => new MessagesItem((global::G.SystemMessage?)value);
144144

145145
/// <summary>
146146
///

src/tests/AutoSDK.SnapshotTests/Snapshots/ai21/SystemTextJson/_#G.Models.QueryFilter.g.verified.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public QueryFilter(object? value)
5555
/// <summary>
5656
///
5757
/// </summary>
58-
public static implicit operator QueryFilter(global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IList<object>> value) => new QueryFilter(value);
58+
public static implicit operator QueryFilter(global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IList<object>> value) => new QueryFilter((global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.IList<object>>?)value);
5959

6060
/// <summary>
6161
///
@@ -90,7 +90,7 @@ public QueryFilter(global::System.Collections.Generic.Dictionary<string, global:
9090
/// <summary>
9191
///
9292
/// </summary>
93-
public static implicit operator QueryFilter(global::System.Collections.Generic.Dictionary<string, object> value) => new QueryFilter(value);
93+
public static implicit operator QueryFilter(global::System.Collections.Generic.Dictionary<string, object> value) => new QueryFilter((global::System.Collections.Generic.Dictionary<string, object>?)value);
9494

9595
/// <summary>
9696
///

src/tests/AutoSDK.SnapshotTests/Snapshots/anthropic/NewtonsoftJson/_#AnyOf.2.g.verified.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace G
2929
/// <summary>
3030
///
3131
/// </summary>
32-
public static implicit operator AnyOf<T1, T2>(T1 value) => new AnyOf<T1, T2>(value);
32+
public static implicit operator AnyOf<T1, T2>(T1 value) => new AnyOf<T1, T2>((T1?)value);
3333

3434
/// <summary>
3535
///
@@ -64,7 +64,7 @@ public AnyOf(T1? value)
6464
/// <summary>
6565
///
6666
/// </summary>
67-
public static implicit operator AnyOf<T1, T2>(T2 value) => new AnyOf<T1, T2>(value);
67+
public static implicit operator AnyOf<T1, T2>(T2 value) => new AnyOf<T1, T2>((T2?)value);
6868

6969
/// <summary>
7070
///

src/tests/AutoSDK.SnapshotTests/Snapshots/anthropic/NewtonsoftJson/_#G.Models.AnthropicBeta.g.verified.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace G
3030
/// <summary>
3131
///
3232
/// </summary>
33-
public static implicit operator AnthropicBeta(string value) => new AnthropicBeta(value);
33+
public static implicit operator AnthropicBeta(string value) => new AnthropicBeta((string?)value);
3434

3535
/// <summary>
3636
///
@@ -65,7 +65,7 @@ public AnthropicBeta(string? value)
6565
/// <summary>
6666
///
6767
/// </summary>
68-
public static implicit operator AnthropicBeta(global::G.AnthropicBetaEnum value) => new AnthropicBeta(value);
68+
public static implicit operator AnthropicBeta(global::G.AnthropicBetaEnum value) => new AnthropicBeta((global::G.AnthropicBetaEnum?)value);
6969

7070
/// <summary>
7171
///

src/tests/AutoSDK.SnapshotTests/Snapshots/anthropic/NewtonsoftJson/_#G.Models.BetaContentBlock.g.verified.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace G
3535
/// <summary>
3636
///
3737
/// </summary>
38-
public static implicit operator BetaContentBlock(global::G.BetaResponseTextBlock value) => new BetaContentBlock(value);
38+
public static implicit operator BetaContentBlock(global::G.BetaResponseTextBlock value) => new BetaContentBlock((global::G.BetaResponseTextBlock?)value);
3939

4040
/// <summary>
4141
///
@@ -70,7 +70,7 @@ public BetaContentBlock(global::G.BetaResponseTextBlock? value)
7070
/// <summary>
7171
///
7272
/// </summary>
73-
public static implicit operator BetaContentBlock(global::G.BetaResponseToolUseBlock value) => new BetaContentBlock(value);
73+
public static implicit operator BetaContentBlock(global::G.BetaResponseToolUseBlock value) => new BetaContentBlock((global::G.BetaResponseToolUseBlock?)value);
7474

7575
/// <summary>
7676
///
@@ -105,7 +105,7 @@ public BetaContentBlock(global::G.BetaResponseToolUseBlock? value)
105105
/// <summary>
106106
///
107107
/// </summary>
108-
public static implicit operator BetaContentBlock(global::G.BetaResponseThinkingBlock value) => new BetaContentBlock(value);
108+
public static implicit operator BetaContentBlock(global::G.BetaResponseThinkingBlock value) => new BetaContentBlock((global::G.BetaResponseThinkingBlock?)value);
109109

110110
/// <summary>
111111
///
@@ -140,7 +140,7 @@ public BetaContentBlock(global::G.BetaResponseThinkingBlock? value)
140140
/// <summary>
141141
///
142142
/// </summary>
143-
public static implicit operator BetaContentBlock(global::G.BetaResponseRedactedThinkingBlock value) => new BetaContentBlock(value);
143+
public static implicit operator BetaContentBlock(global::G.BetaResponseRedactedThinkingBlock value) => new BetaContentBlock((global::G.BetaResponseRedactedThinkingBlock?)value);
144144

145145
/// <summary>
146146
///

0 commit comments

Comments
 (0)