-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Open
Description
P2: ColorOrNullJsonConverter only accepts/writes object-shaped JSON, so valid string or null representations for this union will throw or serialize incorrectly.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At samples/client/petstore/csharp/generichost/latest/NullTypes/src/Org.OpenAPITools/Model/ColorOrNull.cs, line 111:
<comment>ColorOrNullJsonConverter only accepts/writes object-shaped JSON, so valid string or null representations for this union will throw or serialize incorrectly.</comment>
<file context>
@@ -0,0 +1,205 @@
+ {
+ int currentDepth = utf8JsonReader.CurrentDepth;
+
+ if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray)
+ throw new JsonException();
+
</file context>
Originally posted by @cubic-dev-ai[bot] in #23260 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels