Why can't I sometimes enforce an id type input parameter to be minimum 1?

Answered

This doesn't happen always, but I couldn't figure out when or why it happens or not.

Let's say I need to add a record and one field is a reference to a record in another table. In the example below I want to add a new car record that has a relationship with a driver, so there is a 'driver_id' field I need to fill in. Ok, so the endpoint has an input of type integer called 'driver_id' which in my case is required and its value must be 1 or greater. I didn't set any default value.

For some reason I don't understand, I get this error 'Param: driver _id - Invalid method for filter - min' when the 'driver_id' input value is valid, for instance 2. See the screenshots below.

I have other similar endpoints with the same 'min 1' filter applied to this kind of 'id' input and they work perfectly fine. Some work well but some don't.

Anyone knows why?

Arturo

14 replies