ministryofjustice / prison-register

Prison register
MIT License
2 stars 1 forks source link

Add an optional parameter to prisons/names in prison-register to return only active prisons #277

Closed marcusaleman closed 1 day ago

marcusaleman commented 1 day ago

/names : it works as the original contract. active and non active names

/names?active=true :it filters only active names /names?active=false :it filters only non active names

jnioche-jd commented 1 day ago

I would set a default of false

@Mjwillis I think what Marcus is trying to do is have null to keep the existing behaviour i.e. you have both active and inactive. This would have to be very clearly documented.

I had suggested using a different name for the parameter onlyActive=true false as I doubt anyone is interested in having only the names of inactive prisons. With a default value of false, we would keep the existing behaviour.