Skip to content

fix(schema): backport nullability round-trip handling to v2 - #6

Closed
Youssef1313 with Copilot wants to merge 4 commits into
mainfrom
copilot/support-v2-backport-2994
Closed

fix(schema): backport nullability round-trip handling to v2#6
Youssef1313 with Copilot wants to merge 4 commits into
mainfrom
copilot/support-v2-backport-2994

Conversation

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown

Pull Request

Description

Backports PR microsoft#2994 to preserve nullability when OpenAPI 3.1 schemas are downgraded to 3.0 and read back.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Related Issue(s)

Changes Made

  • Serialization: emit enum: [null] and nullable: true for null-only 3.0 schemas; stop inferring parent types from nullable compositions.
  • Deserialization: preserve JSON null enum entries and normalize null-only enums back to JsonSchemaType.Null.
  • Coverage: add 3.0 round-trip tests and update affected schema expectations.
enum:
  - null
nullable: true

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • All existing tests pass

Checklist

  • My code follows the code style of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Versions applicability

  • My change applies to the version 1.X of the library, if so PR link:
  • My change applies to the version 2.X of the library, if so PR link:
  • My change applies to the version 3.X of the library, if so PR link:
  • I have evaluated the applicability of my change against the other versions above.

See the contributing guidelines for more information about how patches are applied across multiple versions.

Additional Notes

Copilot AI and others added 4 commits August 11, 2026 03:20
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants