inputs in service web

I have some doubts about how to set the inputs for a rest post service:

I have two options: 

the first one is to separate it and put an input for each data of the request giving as mandatories to those that will always be needed and the others as optional

The second option is that I have a request where not all the fields I will arrive, that is, not all of them are mandatory, I should put the complete request as input, in case in the future they will need to send other data.


which one is wrong?


Hello Nicolas,

Can you please explain betetr what you want to do with the API method?

I think that 2 options will works (with some differences)

BR,

Luis

Luís Cardoso wrote:

Hello Nicolas,

Can you please explain betetr what you want to do with the API method?

I think that 2 options will works (with some differences)

BR,

Luis


Hello Luis
The issue is to know which of the two the best option to be reusable in the future. As well as knowing which one is more attached to good programming practices.