Skip to content

Commit 07fbbf2

Browse files
committed
Add explanatory comment
1 parent 6a112ea commit 07fbbf2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/go-gen/src/schema.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ pub fn schema_object_type(
4242
Nullability::NonNullable
4343
};
4444

45+
// Check for a default value.
46+
// This is the case if the field was annotated with `#[serde(default)]` or variations of it.
47+
// A `null` value is not necessarily allowed in this case,
48+
// so we want to omit the field on the Go side.
4549
if schema
4650
.metadata
4751
.as_ref()

0 commit comments

Comments
 (0)