spring-projects / spring-projects/spring-data-rest
Validation support minLength, maxLength, minimum and maximum
Open
Nobody has claimed this yet.
status: pending-design-work
type: enhancement
- Dominant language
- Java
- Stars
- 958
- Forks
- 568
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I would like use spring-data-rest with react json form schema.
So, I would like use HTML 5 in validations supporterd fields by min, max and size.
Then, I recomend change JsonSchemaProperty to add new fields used in validation.
The resuled expected is:
{
"title": "Menu",
"properties": {
"route": {
"title": "Route",
"readOnly": false,
"type": "string",
"minLength": 5,
"maxLength": 60
},
"denner": {
"title": "Denner",
"readOnly": false,
"type": "integer",
"minimum": 5,
"maximum": 10
}
}
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.
Research direction
Start with JsonSchemaProperty and trace how the REST JSON schema is produced. Check the referenced React JSON Schema Form examples to confirm the expected minLength, maxLength, minimum, and maximum output, then verify the generated schema matches the examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100