Skip to content

Commit bab0e08

Browse files
author
Robert Anderson
committed
Reducing the Json type down to the base JToken object to support primitives as well (needed by Excel). Also, preventing the Microsoft.Graph.Json object from being generated at all.
1 parent 8551ef8 commit bab0e08

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/GraphODataTemplateWriter/CodeHelpers/CSharp/TypeHelperCSharp.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public static string GetTypeString(this string type)
134134
case "date":
135135
return "Date";
136136
case "json":
137-
return "Newtonsoft.Json.Linq.JObject";
137+
return "Newtonsoft.Json.Linq.JToken";
138138
default:
139139
return type.ToCheckedCase();
140140
}

src/GraphODataTemplateWriter/Extensions/OdcmModelExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private static OdcmNamespace GetOdcmNamespace(OdcmModel model)
4242
public static IEnumerable<OdcmClass> GetComplexTypes(this OdcmModel model)
4343
{
4444
var @namespace = GetOdcmNamespace(model);
45-
return @namespace.Classes.Where(x => x is OdcmComplexClass);
45+
return @namespace.Classes.Where(x => x is OdcmComplexClass && x.CanonicalName() != "microsoft.graph.Json");
4646
}
4747

4848
public static IEnumerable<OdcmClass> GetEntityTypes(this OdcmModel model)

0 commit comments

Comments
 (0)