Ministerial code says ministers have duty to be ‘as open as possible’ with the public