Missing JSON Serialization Implementation: The GraphNodesQueryJsonConverter.Write() method was empty (auto-generated stub), causing all union type properties to be serialized with their default null values instead of only serializing the active property. This resulted in invalid JSON being sent to the API.
// GraphNodesQuery is a oneOf type - serialize only the non-null property
if (graphNodesQuery.AndGraphNodesQuery != null)
{
JsonSerializer.Serialize(writer, graphNodesQuery.AndGraphNodesQuery, jsonSerializerOptions);
}
else if (graphNodesQuery.OrGraphNodesQuery != null)
{
JsonSerializer.Serialize(writer, graphNodesQuery.OrGraphNodesQuery, jsonSerializerOptions);
}
else if (graphNodesQuery.NotGraphNodesQuery != null)
{
JsonSerializer.Serialize(writer, graphNodesQuery.NotGraphNodesQuery, jsonSerializerOptions);
}
else if (graphNodesQuery.AnyNode != null)
{
JsonSerializer.Serialize(writer, graphNodesQuery.AnyNode, jsonSerializerOptions);
}
else if (graphNodesQuery.NucliadbModelsGraphRequestsGenerated != null)
{
JsonSerializer.Serialize(writer, graphNodesQuery.NucliadbModelsGraphRequestsGenerated, jsonSerializerOptions);
}
else
{
// Empty object for empty query
writer.WriteStartObject();
writer.WriteEndObject();
}
nuclia-dotnet-sdk/src/Progress.Nuclia/Model/Generated/GraphNodesQuery.cs
Line 233 in be99ecf
Missing JSON Serialization Implementation: The
GraphNodesQueryJsonConverter.Write()method was empty (auto-generated stub), causing all union type properties to be serialized with their default null values instead of only serializing the active property. This resulted in invalid JSON being sent to the API.