Skip to content

[support/v2] Better nullability round-tripping - #3003

Merged
Vincent Biret (baywet) merged 1 commit into
microsoft:support/v2from
Youssef1313:copilot/backport-pr-2994-to-support-v2
Aug 11, 2026
Merged

Vincent Biret (baywet) merged 1 commit into
microsoft:support/v2from
Youssef1313:copilot/backport-pr-2994-to-support-v2

Conversation

@Youssef1313

Copy link
Copy Markdown
Member

Backports #2994 to support/v2.

fixes a bug in deserialization where a null in enum array would be dropped
emits "nullable": true when we detect a null type, even if we haven't serialized a type (i.e, we allow emitting a redundant nullable property)
detects the pattern of `enum: [ null ]`, and deserialize it `JsonSchemaType.Null`. This makes round-tripping behavior better.

(cherry picked from commit 655c2c8)

Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
@Youssef1313
Youssef Fahmy (Youssef1313) requested a review from a team as a code owner August 11, 2026 08:29
@baywet
Vincent Biret (baywet) merged commit 3f66f87 into microsoft:support/v2 Aug 11, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants