[foretello] problems calling system create v2 api

Having some troubles…

When I call system create via apipie[1], if I don't nest the params under 'system' I get a 400

Completed 400 Bad Request in 207.8ms (Views: 0.7ms | ActiveRecord: 8.5ms)
With body: Missing values for system.

If I add the 'system' to the apipie call I get errors as it runs the controller filters[2].

Really doubting my sanity! Things that worked a few days ago no longer do and I'm not sure why.

[1] https://github.com/thomasmckay/hammer-cli-csv/blob/test-fixes/lib/hammer_cli_csv/systems.rb#L143
[2] https://github.com/Katello/katello/blob/master/app/controllers/katello/api/v2/api_controller.rb#L157

··· -- @thomasmckay


“The leader must aim high, see big, judge widely, thus setting himself apart form the ordinary people who debate in narrow confines.” ~ Charles De Gaulle

“Leadership is about making others better as a result of your presence and making sure that impact lasts in your absence.” ~ Harvard Business School

This issue was caused by wrong Content-type of the request that confused
wrap_parameters. Fixed in apipie-bindings 0.0.6. Thanks to all involved :wink:

Martin

··· On 03/21/2014 02:09 AM, Tom McKay wrote: > Having some troubles... > > When I call system create via apipie[1], if I don't nest the params under 'system' I get a 400 > > Completed 400 Bad Request in 207.8ms (Views: 0.7ms | ActiveRecord: 8.5ms) > With body: Missing values for system. > > If I add the 'system' to the apipie call I get errors as it runs the controller filters[2]. > > Really doubting my sanity! Things that worked a few days ago no longer do and I'm not sure why. > > > [1] https://github.com/thomasmckay/hammer-cli-csv/blob/test-fixes/lib/hammer_cli_csv/systems.rb#L143 > [2] https://github.com/Katello/katello/blob/master/app/controllers/katello/api/v2/api_controller.rb#L157 >