django-rest-framework-docs
django-rest-framework-docs copied to clipboard
ModelViewSet doesn't show request methods, instead it only show option button
I am using model view set and register it with router. On /docs url, it shows only option button. It doesn't show request methods(eg. GET, POST etc). Similarly on clicking plugin button, it only shows option button, not request methods. I am not able to send get request. Since it shows field required error messages.
Hello @gauravsoni119! Unfortunately DRFdocs currently doesn't support ModelViewSet
but it it is the first thing on my list and hope to solve it soon!
For information, this issue is solved in https://github.com/debnet/django-rest-framework-docs
A second pull request will follow as soon as we merged upstream/master.
@debnet That looks really nice! https://github.com/debnet/django-rest-framework-docs/commit/85ba4d2623a45a336623c6862bbaa1937704d923
Looking forward to a PR with ModelViewSet
support!
@debnet If you need any help or want to discuss about implementing ModelViewSet
, there is now a slack channel in the pythondev.slack.com team - channel #drfdocs
. Feel free to ping me there!
Fixed in #70.
@debnet I am really looking forward to a pypi release. This would make me move my project to drfdocs. :-)
22 days from fix, still not on pypi. Why?
+1
Hello! There is only problem with that PR it adds more functionality than just support for ModelViewSets so I would prefer to split it up. @debnet Can you make a pull request only with support for ModelViewSets?
Ps. Maybe use cherry-pick
from the existing PR?
yes, unfortunately, current pull request makes code much more complicated. @debnet will you update pullrequest, or I should do that (hope, this weekend)?
In my opinion, the code is much clearer that way and it provides some new appreciable features. We use it everyday in production environment, but if you would to slice it into multiple PR, free to you to do so, I don't even know how to do this on my fork. ^^
hi, is there any update here? ModelViewSet is something widely used
Hi @egamonal! This one appears to be more complicated than it looks. There is some work in progress in #74. Hope to have some news and a PyPI release soon!
Ps. I know many people(including myself) are waiting for this one!
:+1:
Hi! @ekonstantinidis I really like your project. I would really like to contribute but am not sure how. I think that this is the most important issues because it makes the project unusable. I see that this issue is marked as "work in progress" but the last commit was 2 months ago.
Do you want some help for that issue? Do you still maintain this project?
I plan to look at the source this days and send some PRs.
Hello @Ivaylo-Bachvarov ! Thank you for your kind words! I've been really busy with work and another project and supporting ModelViewSet
appears to be more complicated than it looked in the beginning. I've started a PR ( #74 ) but didn't have the time to finish it. So yes - it would be great if you can help with this issue and I'll be more than happy for any PRs.
The project is still maintained and my plan is to work on it in the next couple of months. There is a Slack room under the pythondev team(http://pythondev.slack.com) so if I can help you with anything ping me there! Thanks!
Any update about this?
@dekoza I didn't have time to tackle this one yet. Any help is much appreciated!
Hello, is there any update about this issue? We would like to use drfdocs but only if this feature is available. Thanks for any news on this.
Does it have to be for ModelViewSet
s? I'm developing ViewSet
s and I think this work could apply to those too.
I've been playing with drfdocs and drf-swagger. I think I really like drfdocs for its cleanness and tidiness. Is there any work on this issue that is promising? I can give a hand to make it better.
@debnet just installed your fork, is there anything that should be added to the code for this to work? I´m still only seeing the options method.
Any further news on this, as it's holding me back from utilizing this wonderful app :)
+1 on that. Any word on whether this is still in progress?
Seems to work for me. Could you provide more details @busla?
@debnet, Yes, a limited number of POST requests will show up in DRF docs. For example, this URL allows GET and POST...
and both of them show up in drf docs as expected...
For normal viewsets this works brilliantly. The issue described is specifically for ModelViewSets.
For ModelViewSets the DRF docs does not display the "POST" option... The top two images show a valid POST, GET and OPTIONS request for a given URL. But the bottom image of the DRF docs shows only GET and OPTIONS. The POST option seems to be missing which currently makes DRF docs unusable for me. This is a shame it mainly looks incredibly promising