I've a scenario where my json object should look like
{
"domainObject" :{
"amount" : "1230798373024",
"business" : "n/a",
"productGroup" : "n/a",
"productType" : "n/a",
"balanceType" : "n/a",
"balanceSubType" : "n/a"
},
"uniqueId" : "test1",
"userId" : "user1"
}
I've 2 questions:
- I'm confused if I should create 2 DTOs, one for domainObject and another for entire object or is there any better way around?
- I want to generate a different id(uniqueId) for every request, what should be the better option, given that this api would be triggered around few 100 times a day. Should I use random UUID but then is there any assurance these id's won't collide or is there any better way around?