Skip to content

test: reproduce nullable Java component references - #3363

Draft
janeklb wants to merge 1 commit into
springdoc:mainfrom
janeklb:test/java-nullable-component-reference
Draft

janeklb wants to merge 1 commit into
springdoc:mainfrom
janeklb:test/java-nullable-component-reference

Conversation

@janeklb

@janeklb janeklb commented Sep 15, 2026

Copy link
Copy Markdown

Motivation

Java @Nullable component-reference properties are emitted as non-nullable bare $ref schemas in OpenAPI 3.0. This draft adds a focused regression test for #3362.

Modification

  • Add a WebMVC endpoint returning a response with a @Nullable Java component reference.
  • Assert that generated OpenAPI 3.0 scopes nullability to the property through a nullable allOf reference wrapper.

Result

The new test currently fails because Springdoc generates a bare $ref without the expected nullable wrapper. It provides a minimal executable reproduction for the issue.

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.

1 participant