Commit graph

22 commits

Author SHA1 Message Date
Marin Jankovski
cd0aed3d54 Add a message when unable to save an object through api. 2015-01-07 10:46:00 +01:00
Marin Jankovski
7240150c89 Forward the messages in api response. 2014-12-30 15:17:46 +01:00
Dmitriy Zaporozhets
c4b02642d2
Replace milestone observer with services
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-10 18:07:52 +03:00
Angus MacArthur
aefe2e952f Fixing unsafe use of Thread.current variable :current_user 2013-10-16 01:20:53 -04:00
Dmitriy Zaporozhets
963f475daf Fix milestone api docs: invalid param for close 2013-06-06 12:32:05 +03:00
Dmitriy Zaporozhets
634cbd7138 Refactor API classes. So api classes like Gitlab::Issues become API::Issues 2013-05-14 15:33:31 +03:00
Sebastian Ziebell
7499f65014 API: extracted helper method to validate required parameters, code clean up
Added a helper method to check if required parameters are given in an API call. Can be used
to return a `400 Bad Request` return code if a required attribute is missing.
Code clean up and fixed tests.
2013-02-27 17:50:30 +01:00
Sebastian Ziebell
4a60c377b8 API documentation update for milestones
Updated the milestones API documentation and added return codes descriptions.
2013-02-20 22:51:59 +01:00
Sebastian Ziebell
eefb27f5ae Merge branch 'master' into fixes/api
Conflicts:
	spec/requests/api/projects_spec.rb
2013-02-20 12:43:32 +01:00
Andrew8xx8
0b512af803 Milestone uses StateMachine now 2013-02-18 14:43:50 +04:00
Sebastian Ziebell
6fc3263e15 API: extracted helper method to provide 400 bad request error with description
Extracted a method for 400 error (Bad request) and adjusted code accordingly. The name of
the missing attribute is used to show which one was missing from the request. It is used to
give an appropriate message in the json response.
2013-02-13 15:48:52 +01:00
Sebastian Ziebell
5be0265fe7 Status code 400 returned if title not given in a milestone (via API)
If a milestone is created via API but no title given then status code 400 (Bad request)
is returned instead of 404. A small helper method handles the errors collection of a
milestone.
2013-02-06 17:10:29 +01:00
Riyad Preukschas
8f01190eb5 Remove all references tp the project code parameter from the API 2012-12-21 18:47:04 +01:00
Dmitriy Zaporozhets
10d3a30b25 APi for commits. Better api docs 2012-09-21 13:22:30 +03:00
Alex Denisov
b896880eb4 Method name changed 2012-09-16 20:08:57 +03:00
Alex Denisov
549c4c2202 API attributes refactored 2012-09-16 19:51:04 +03:00
Alex Denisov
915dac0055 Error throwing moved to api_helper 2012-09-10 10:41:46 +03:00
randx
b565f33472 Auth for API 2012-09-10 09:06:11 +03:00
Nihad Abbasov
76e4d94d43 add pagination to API 2012-09-03 04:46:29 -07:00
Robert Speicher
8a49cdc3b4 Add milestone API docs to doc/README and views/help/api
Also removes `closed` attribute option from create action.
2012-08-29 08:45:00 -04:00
Robert Speicher
0f1ca8b3e7 Remove DELETE API for Milestones 2012-08-22 13:19:55 -04:00
Robert Speicher
b0a901fe01 Add API for Milestones 2012-08-16 14:52:42 -04:00