Skip to content

Commit

Permalink
importer-msgraph-metadata: extra safety when assumung nullable fields…
Browse files Browse the repository at this point in the history
… from description
  • Loading branch information
manicminer committed Aug 18, 2024
1 parent f082d47 commit 7fb52b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/importer-msgraph-metadata/components/parser/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.") {
Expand Down

0 comments on commit 7fb52b6

Please sign in to comment.