You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In POST newAdvertisement, there needs to be a JSON payload like that:
{
"type":"OFFER",
"category": {
"id":5
},
"user": {
"id":4711
},
"title":"4 room apartment for rent",
"description":"It is a apartment with 4 rooms near a lake.",
"price":400,
"location":"7th Ave, NYC"
}
As you can see, for category and user, only the id is needed but the id of the Advertisement itself is missing (it gets generated by JPA).
POST newUser
On the other hand, if you want to create a new User, the JSON payload looks like that:
The text was updated successfully, but these errors were encountered:
Zeratoxx
changed the title
Support for groups used for validation annotations
Support for groups used for validation annotations is missing
Dec 10, 2021
I am using validator groups for complex objects.
Given the following DTOs / Classes:
AdvertisementDTO
UserDTO
CategoryDTO
ValidatorGroup
JSON Payloads
POST newAdvertisement
In POST newAdvertisement, there needs to be a JSON payload like that:
As you can see, for category and user, only the id is needed but the id of the Advertisement itself is missing (it gets generated by JPA).
POST newUser
On the other hand, if you want to create a new User, the JSON payload looks like that:
All informations except the id.
Conclusion
In the current release, the groups are ignored.
The text was updated successfully, but these errors were encountered: