balanced / balanced-api

Balanced API specification.
221 stars 72 forks source link

Discrepancy in errors schema #455

Closed steveklabnik closed 10 years ago

steveklabnik commented 10 years ago

The errors schema doesn't include a root, but the failed reversal includes one:

{"errors"=>[{"status"=>"Bad Request", "category_code"=>"request", "additional"=>nil, "status_code"=>400, "category_type"=>"request", "extras"=>{"amount"=>"\"100000
00\" must be <= 2000"}, "request_id"=>"OHM4d8485ca69d011e3bc97026ba7d31e6f", "description"=>"Invalid field [amount] - \"10000000\" must be <= 2000 Your request id 
is OHM4d8485ca69d011e3bc97026ba7d31e6f."}]}                                                                                                                                                                                                                                              

The property '#/' did not contain a required property of 'status' in schema

Status is inside "errors". Which is right?

mahmoudimus commented 10 years ago

Errors should be enveloped and status should be in errors (the API is correct).

steveklabnik commented 10 years ago

Cool, thanks!

steveklabnik commented 10 years ago

The schema has since been updated.