puppetlabs/puppetdb — pull request #580 by kbarber (2013-07-27 20:44:19+00:00)
Title: (#19174) Change query parameter to optional for facts & resources

Previously for the /v2/facts and /v2/resources end-point we had documented that
the query parameter was required, however a blank query parameter could be used
to return _all_ data, so this assertion wasn't quite accurate. However one
could never really drop the query parameter as it was considered mandatory and
without it you would get an error.

To align with the need to return all results at times, and the fact that
making a query like '/v2/facts?query=' to do such a thing is wasteful, we have
decided to drop the mandatory need for the 'query' parameter.

This patch allows 'query' to be an optional parameter for /v2/facts & resources
by removing the validation check and updating the documentation to reflect this
this new behaviour.

Signed-off-by: Ken Barber