Skip to content

PagedModel.getMetadata method should not be annotated with @Nullable #3313

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

Open
hashpyrit opened this issue Jun 13, 2025 · 0 comments
Open
Assignees
Labels
status: waiting-for-triage An issue we've not yet triaged

Comments

@hashpyrit
Copy link

In the class org.springframework.data.web.PagedModel the getMetadata method is annotated with @nullable.

Based on how the code is written, with page being mandatory as part of the constructor, the getMetadata method should always return an object, never null.

This is causing issues with typescript generation where it's saying that the metadata is optional, when it's really not. It will always be present based on how the code is written.

Additionally, it seems odd to have a page without mandatory paging information.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

No branches or pull requests

3 participants