Skip to content

Comments

NullPointerException when oneOf changes to anyOf in response schema#892

Merged
DrSatyr merged 1 commit intomasterfrom
DrSatyr/issue381
Feb 23, 2026
Merged

NullPointerException when oneOf changes to anyOf in response schema#892
DrSatyr merged 1 commit intomasterfrom
DrSatyr/issue381

Conversation

@DrSatyr
Copy link
Collaborator

@DrSatyr DrSatyr commented Feb 23, 2026

Fixes #381


Summary by cubic

Prevented a NullPointerException when diffing schemas where a response changes from oneOf to anyOf. Fixes #381 to ensure the diff completes without crashing.

  • Bug Fixes
    • Added null check before iterating composedSchema.getOneOf() in ComposedSchemaDiffResult#getMapping.
    • Added regression test (OneOfToAnyOfDoesNotThrow) with new fixtures to cover oneOf→anyOf changes.

Written for commit 59f07c3. Summary will update on new commits.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

@bors2908
Copy link

@DrSatyr

LGTM

@DrSatyr DrSatyr merged commit 60e6a9f into master Feb 23, 2026
7 checks passed
@DrSatyr DrSatyr deleted the DrSatyr/issue381 branch February 23, 2026 09:59
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.

NullPointerException when oneOf changes to anyOf in response schema

2 participants