Skip to content

Commit

Permalink
Update docs in GlobalComponent views.
Browse files Browse the repository at this point in the history
Make /update fields consistent with /create and new client arguments.
  • Loading branch information
xychu committed Oct 16, 2015
1 parent ed37d52 commit e6c51ea
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions pdc/apps/component/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ def create(self, request, *args, **kwargs):
'dist_git_path': string, # optional
'upstream': dict, # optional
}
__Response__:
{
Expand Down Expand Up @@ -262,15 +263,17 @@ def update(self, request, *args, **kwargs):
__Method__:
PUT: for full fields update
{'name': 'new_name', 'dist_git_path': 'new_dist_git_path'}
PUT/PATCH: for update
__Data__:
PATCH: for partial update
{'name': 'new_name'}
or
{'dist_git_path': 'new_dist_git_path'}
or
{'name': 'new_name', 'dist_git_path': 'new_dist_git_path'}
# accept any field(s) from 'name', 'dist_git_path' and 'upstream'
{'name': 'new_name',
'dist_git_path': 'new_dist_git_path',
'upstream': {'homepage': 'homepage',
'scm_type': 'scm-type',
'scm_url': 'url'}
}
__URL__: $LINK:globalcomponent-detail:instance_pk$
Expand Down

0 comments on commit e6c51ea

Please sign in to comment.