I am creating a post rest endpoint that will create resource 'child'. My uri is:
/parents/{parentId}/child
What are the rest standards for the content of the body for this request? Should the data be related only to the child resource (option 1) or should the parent id be present in the body (option 2) along with being present in the uri?
Option 1:
{
name: 'name',
age: '10'
}
Option 2:
{
parentId: 'abc'
name: 'name',
age: '10'
}