You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/readme.graph.md
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -426,7 +426,7 @@ directive:
426
426
- from: source-file-csharp
427
427
where: $
428
428
transform: >
429
-
if (!$documentPath.match(/generated%5Capi%5CModels%5CMicrosoftGraph\w*\d*.json.cs/gm))
429
+
if (!$documentPath.match(/generated%5Capi%5CModels%5C\w*MicrosoftGraph\w*\d*.json.cs/gm))
430
430
{
431
431
return $;
432
432
} else {
@@ -439,6 +439,18 @@ directive:
439
439
// Pass exclusion properties to base classes during serialization.
440
440
let baseClassInitializerRegex = /(new\s*Microsoft.Graph.PowerShell.Models.MicrosoftGraph\w*\(\s*json\s*,\s*new\s*global::System.Collections.Generic.HashSet<string>\()(\){\W.*}\);)/gm
441
441
$ = $.replace(baseClassInitializerRegex, '$1(exclusions ?? new System.Collections.Generic.HashSet<string>())$2');
442
+
443
+
// Fix additional properties deserialization in Complex Types.
444
+
let complexTypeHintRegex = /(\s*)(Microsoft\.Graph\.PowerShell\.Runtime\.JsonSerializable\.FromJson)/gm
445
+
if($.match(complexTypeHintRegex)) {
446
+
let classNameRegex = /partial\s*class\s*(\w*)\s*{/gm
447
+
let match = classNameRegex.exec($);
448
+
let interfaceName = "I" + match[1] + "Internal";
449
+
450
+
let getExclusionsDynamically = '\n$1if (exclusions == null) { exclusions = new System.Collections.Generic.HashSet<string>(global::System.StringComparer.OrdinalIgnoreCase); var properties = typeof('+interfaceName+').GetProperties(); foreach (var property in properties) { exclusions.Add(property.Name);}}'
0 commit comments