Skip to content

Missing required argument doesn't cause an error when that argument type is boolean #2092

@CarlosCuevas

Description

@CarlosCuevas
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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions