spring-projects / spring-projects/spring-data-rest
JSON schema has a field `requiredProperties` but this should be `required` per the JSON Schema spec
@odrotbohm is already working on this.
Since Oct 20, 2025.
- Dominant language
- Java
- Stars
- 958
- Forks
- 568
- PR merge metrics
- No merged PRs in 30d
Description
As the title says, when generating a JSON schema from a Spring Boot application with Spring Data REST the resulting schema contains a field requiredProperties with all non-nullable fields. This field should be named required instead. The field is defined here:
See this page for the exact spec: https://json-schema.org/understanding-json-schema/reference/object#required .
I also found this issue that mentions a requiredProperties field, perhaps that might be related / have caused some confusion.
For extra context, I generated the JSON schema like this (for a companies repo): curl --header 'Accept: application/schema+json' http://localhost:8080/api/v1/profile/companies
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.