From 7fb52b64d69069818a801cbb00d90fb8cc527248 Mon Sep 17 00:00:00 2001 From: Tom Bamford Date: Sun, 18 Aug 2024 19:55:37 +0100 Subject: [PATCH] importer-msgraph-metadata: extra safety when assumung nullable fields from description --- tools/importer-msgraph-metadata/components/parser/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/importer-msgraph-metadata/components/parser/types.go b/tools/importer-msgraph-metadata/components/parser/types.go index 20a7faff251..37546c06486 100644 --- a/tools/importer-msgraph-metadata/components/parser/types.go +++ b/tools/importer-msgraph-metadata/components/parser/types.go @@ -737,7 +737,7 @@ func Schemas(input flattenedSchema, name string, models Models, constants Consta } // Detect nullable, read-only and requried fields from the description - if strings.Contains(schema.Description, "Nullable.") { + if strings.Contains(schema.Description, "Nullable.") && !strings.Contains(strings.ToLower(schema.Description), "not nullable.") { field.Nullable = true } if strings.Contains(schema.Description, "Read-only.") {