Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema inspection ignores types wrapped by Optional #875

Closed
bclozel opened this issue Jan 12, 2024 · 0 comments
Closed

Schema inspection ignores types wrapped by Optional #875

bclozel opened this issue Jan 12, 2024 · 0 comments
Assignees
Labels
in: core Issues related to config and core support type: bug A general bug
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Jan 12, 2024

When a @Controller declares a handler method return type like Optional<Book>, the SchemaMappingInspector does not inspect the Book type and the resulting inspection report can mention the type and its fields as unmapped:

Unmapped fields: {Book=[id, title]}

The SchemaMappingInspector is currently aware of reactive types and unwraps them. We should have a similar approach for java.util.Optional.

@bclozel bclozel added type: bug A general bug in: core Issues related to config and core support labels Jan 12, 2024
@bclozel bclozel added this to the 1.2.5 milestone Jan 12, 2024
@bclozel bclozel self-assigned this Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues related to config and core support type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant