Person.remoteMethod('createPerson', {
accepts: [
{ arg: 'name', type: 'string', required: true },
{ arg: 'age', type: 'number', required: true },
{ arg: 'is_alive', type: 'boolean', required: true }
],
http: {
path: '/',
verb: 'post'
}
});
If I send a request to this endpoint that is missing 'name' or 'age', it will return an error. If I send a request missing 'is_alive', it will proceed with 'is_alive' set to false.