Skip to content

feat: add JavaNullablePropertyCustomizer to handle nullable properties in OpenAPI schemas - #3382

Open
Mattias-Sehlstedt wants to merge 1 commit into
springdoc:mainfrom
Mattias-Sehlstedt:java-nullable-customizer
Open

Mattias-Sehlstedt wants to merge 1 commit into
springdoc:mainfrom
Mattias-Sehlstedt:java-nullable-customizer

Conversation

@Mattias-Sehlstedt

@Mattias-Sehlstedt Mattias-Sehlstedt commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Implements the existing behavior from Kotlin with nullability (KotlinNullablePropertyCustomizer) resolving for ref:s in Java.

Note that this behavior is configurable, and that it is opt-in. So there should be no issues with consumers getting a surprise behavior that they cannot easily disable.

This feature also already considers a missing case for nullability that has been handled in #3381 for Kotlin.

The expectation is that this logic will later live in swagger-core, see for example swagger-api/swagger-core#5077 (comment). But until then it would be helpful to provide the behavior here.

@Mattias-Sehlstedt
Mattias-Sehlstedt force-pushed the java-nullable-customizer branch from 70e3698 to 4ed6e2c Compare October 8, 2026 18:27
@Mattias-Sehlstedt
Mattias-Sehlstedt force-pushed the java-nullable-customizer branch from 4ed6e2c to 1532763 Compare October 8, 2026 18:40
@Mattias-Sehlstedt Mattias-Sehlstedt changed the title feat: Add JavaNullablePropertyCustomizer to handle nullable properties in OpenAPI schemas feat: add JavaNullablePropertyCustomizer to handle nullable properties in OpenAPI schemas Oct 8, 2026

This branch has not been deployed

No deployments
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