Skip to content

Mark Spring Data Page properties as required - #3353

Closed
dpkass wants to merge 2 commits into
springdoc:mainfrom
dpkass:codex/require-page-schema-properties
Closed

dpkass wants to merge 2 commits into
springdoc:mainfrom
dpkass:codex/require-page-schema-properties

Conversation

@dpkass

@dpkass dpkass commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Marks the standard properties of directly serialized Spring Data Page schemas as required. Spring Data always emits these fields, but the generated schema currently leaves them optional, causing client generators to model fields such as content and totalPages as optional.

This only applies to direct Page serialization. VIA_DTO serialization remains unchanged. Regression fixtures cover OpenAPI 3.0 and 3.1.

Direct Spring Data Page serialization always includes the standard page fields. Reflect that runtime contract in generated schemas so client generators do not make every page property optional.
@dpkass
dpkass marked this pull request as ready for review September 15, 2026 16:35
@dpkass

dpkass commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Closing this in favor of #3360. Marking every directly serialized Page property as required is not correct for Page.unpaged(), where that contract does not hold. The newer PR targets Spring Data’s stable PagedModel representation instead.

@dpkass dpkass closed this Sep 15, 2026
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