{"action":"opened","issue":{"url":"https://api.github.com/repos/hasadna/OpenTrainCommunity/issues/40","repository_url":"https://api.github.com/repos/hasadna/OpenTrainCommunity","labels_url":"https://api.github.com/repos/hasadna/OpenTrainCommunity/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/hasadna/OpenTrainCommunity/issues/40/comments","events_url":"https://api.github.com/repos/hasadna/OpenTrainCommunity/issues/40/events","html_url":"https://github.com/hasadna/OpenTrainCommunity/issues/40","id":336328501,"node_id":"MDU6SXNzdWUzMzYzMjg1MDE=","number":40,"title":"rest_framework_swagger's API doc generation can't handle query params","user":{"login":"chaimkut","id":1482729,"node_id":"MDQ6VXNlcjE0ODI3Mjk=","avatar_url":"https://avatars0.githubusercontent.com/u/1482729?v=4","gravatar_id":"","url":"https://api.github.com/users/chaimkut","html_url":"https://github.com/chaimkut","followers_url":"https://api.github.com/users/chaimkut/followers","following_url":"https://api.github.com/users/chaimkut/following{/other_user}","gists_url":"https://api.github.com/users/chaimkut/gists{/gist_id}","starred_url":"https://api.github.com/users/chaimkut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chaimkut/subscriptions","organizations_url":"https://api.github.com/users/chaimkut/orgs","repos_url":"https://api.github.com/users/chaimkut/repos","events_url":"https://api.github.com/users/chaimkut/events{/privacy}","received_events_url":"https://api.github.com/users/chaimkut/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-27T17:51:45Z","updated_at":"2018-06-27T17:51:45Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"https://github.com/hasadna/OpenTrainCommunity/blob/e6bfe77b33ad5b8b148e15b5b3f845dadb652158/train2/train2/urls.py#L23\r\n\r\nrest_framework_swagger generates docs at:\r\nhttp://otrain.org/api/docs\r\n\r\nAPI endpoints that require query parameters (as opposed to URL-supplied parameters) do not have those parameters generated in the documentation. Pressing the `Try it out!` button, for instance, will return a 500 error for:\r\n\r\nhttp://otrain.org/api/docs/#!/general/general_goto_sleep\r\nhttp://otrain.org/api/docs/#!/routes/routes_all_by_date\r\nhttp://otrain.org/api/docs/#!/stats/stats_from_to_full\r\nhttp://otrain.org/api/docs/#!/stats/stats_path_info_full\r\nhttp://otrain.org/api/docs/#!/stats/stats_route_info\r\nhttp://otrain.org/api/docs/#!/stops/stops_from_to\r\nhttp://otrain.org/api/docs/#!/trips/trips_list_compact\r\n\r\nThis is a known issue with this package ever since YAML was deprecated. The various workarounds mentioned on the internet don't seem to work with `list_route`'s defined on `ViewSet`s, which is how the functions are defined. Also, the rest_framework_swagger package is not being maintained.\r\n\r\nSome related discussions:\r\nhttps://github.com/marcgibbons/django-rest-swagger/issues/549\r\nhttps://github.com/marcgibbons/django-rest-swagger/issues/629\r\nhttps://stackoverflow.com/questions/41104615/how-can-i-specify-the-parameter-for-post-requests-while-using-apiview-with-djang\r\nhttps://stackoverflow.com/questions/28203070/how-to-show-query-parameter-options-in-django-rest-framework-swagger\r\n\r\n![image](https://user-images.githubusercontent.com/1482729/41990685-e092b7ac-7a4b-11e8-927c-4d922f91f193.png)\r\n"}}
{"actor":{"display_login":"chaimkut"}}