Skip to content

Conversation

@zdary
Copy link

@zdary zdary commented Nov 17, 2025

Pull Request

Thank you for contributing to swagger-core!

Please fill out the following information to help us review your PR efficiently.


Description

Enhanced schema generation by recognizing

  • @nullable annotations as nullable and adding "null" to the type array in OpenAPI 3.1.
  • nullable = true in schema and adding "null" to the type array in OpenAPI 3.1.

Introduced a test case to validate the behavior and ensure backward compatibility with explicit @Schema annotations.

Fixes: #5001

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • ♻️ Refactor (non-breaking change)
  • 🧪 Tests
  • 📝 Documentation
  • 🧹 Chore (build or tooling)

Checklist

  • I have added/updated tests as needed
  • I have added/updated documentation where applicable
  • The PR title is descriptive
  • The code builds and passes tests locally
  • I have linked related issues (if any)

Screenshots / Additional Context

Enhanced schema generation by recognizing @nullable annotations as nullable and adding "null" to the type array in OpenAPI 3.1. Introduced a test case to validate the behavior and ensured backward compatibility with explicit @Schema annotations.
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.

[Bug]: Native support for Jakarta @Nullable annotation to generate proper OAS 3.1 nullable types

1 participant