{"action":"created","issue":{"url":"https://api.github.com/repos/encode/django-rest-framework/issues/6060","repository_url":"https://api.github.com/repos/encode/django-rest-framework","labels_url":"https://api.github.com/repos/encode/django-rest-framework/issues/6060/labels{/name}","comments_url":"https://api.github.com/repos/encode/django-rest-framework/issues/6060/comments","events_url":"https://api.github.com/repos/encode/django-rest-framework/issues/6060/events","html_url":"https://github.com/encode/django-rest-framework/pull/6060","id":335800002,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3NDA3Nzg1","number":6060,"title":"Feature/action docs sections","user":{"login":"OmegaDroid","id":719375,"node_id":"MDQ6VXNlcjcxOTM3NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/719375?v=4","gravatar_id":"","url":"https://api.github.com/users/OmegaDroid","html_url":"https://github.com/OmegaDroid","followers_url":"https://api.github.com/users/OmegaDroid/followers","following_url":"https://api.github.com/users/OmegaDroid/following{/other_user}","gists_url":"https://api.github.com/users/OmegaDroid/gists{/gist_id}","starred_url":"https://api.github.com/users/OmegaDroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OmegaDroid/subscriptions","organizations_url":"https://api.github.com/users/OmegaDroid/orgs","repos_url":"https://api.github.com/users/OmegaDroid/repos","events_url":"https://api.github.com/users/OmegaDroid/events{/privacy}","received_events_url":"https://api.github.com/users/OmegaDroid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-26T12:39:08Z","updated_at":"2018-06-26T13:36:33Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/encode/django-rest-framework/pulls/6060","html_url":"https://github.com/encode/django-rest-framework/pull/6060","diff_url":"https://github.com/encode/django-rest-framework/pull/6060.diff","patch_url":"https://github.com/encode/django-rest-framework/pull/6060.patch"},"body":"## Description\r\n\r\nI require the ability to split action data documentation into sections (similar to `list: .. create: ...` from the viewsets docstring). \r\n\r\nI've altered the code so that the method docstring is handled in a similar way to the viewsets description which allows for the documentation sections on actions using `get:`, `post:` etc.\r\n\r\nCheers"},"comment":{"url":"https://api.github.com/repos/encode/django-rest-framework/issues/comments/400311171","html_url":"https://github.com/encode/django-rest-framework/pull/6060#issuecomment-400311171","issue_url":"https://api.github.com/repos/encode/django-rest-framework/issues/6060","id":400311171,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDMxMTE3MQ==","user":{"login":"rpkilby","id":2370209,"node_id":"MDQ6VXNlcjIzNzAyMDk=","avatar_url":"https://avatars0.githubusercontent.com/u/2370209?v=4","gravatar_id":"","url":"https://api.github.com/users/rpkilby","html_url":"https://github.com/rpkilby","followers_url":"https://api.github.com/users/rpkilby/followers","following_url":"https://api.github.com/users/rpkilby/following{/other_user}","gists_url":"https://api.github.com/users/rpkilby/gists{/gist_id}","starred_url":"https://api.github.com/users/rpkilby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpkilby/subscriptions","organizations_url":"https://api.github.com/users/rpkilby/orgs","repos_url":"https://api.github.com/users/rpkilby/repos","events_url":"https://api.github.com/users/rpkilby/events{/privacy}","received_events_url":"https://api.github.com/users/rpkilby/received_events","type":"User","site_admin":false},"created_at":"2018-06-26T13:36:33Z","updated_at":"2018-06-26T13:36:33Z","author_association":"MEMBER","body":"This would be a good complement to the work done in #5605. I'm curious if this would work as expected with the method mapping introduced in the PR. e.g., something like:\r\n\r\n```python\r\nclass SomeViewSet(viewsets.ModelViewSet):\r\n\r\n    @action(detail=False, methods=['get', 'post'])\r\n    def some_action(self, request, *args, **kwargs):\r\n        \"\"\"\r\n        get:\r\n        A description of the get method on the custom action.\r\n\r\n        post:\r\n        A description of the post method on the custom action.\r\n        \"\"\"\r\n\r\n    @some_action.mapping.put\r\n    def put_some_action():\r\n        \"\"\"\r\n        A description of the put method on the custom action.\r\n        \"\"\"\r\n```"}}
{"actor":{"display_login":"rpkilby"}}