Conversation
I've also run into this and think it's a great idea. I'm also running into issues where my permissions are causing my swagger docs to 500, as the state is much different when displaying the schema vs actually hitting the API. I don't think permissions should be necessary when simply mapping out the urls. +1 ! |
@craiga do you know of a workaround on a per-view basis I could implement in the meantime? Looking like something around custom schemas attached to my views might work? |
@nicholasserra Sorry, but I don’t. I’ve been using my own branch with this PR included for a while now and it seems to be working fine. |
Is this going to be merged into master anytime soon? Since I see that the PR is hanging for a couple of months already and we are in need of this to simplify things. |
@lukzmu I just noticed that Marc posted a call for help to deal with stuff like this, so it might be a while unless someone's able to volunteer to help out. |
Oh just saw that as well, think we will have to import the PR for now then :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Could someone please approve this to push this forward. I would really appreciate it. |
I just tested the proposed pull request. It works great for me with one exception. I have one View that uses the It is easy enough for me to adapt the |
@BenjaminHabert Can you provide a stack trace of where that problem is happening? The docs state that the request argument to |
here is the stacktrace:
And here is the culprit (which was easy enough to modify and protect against this error): # file: moon-api/moon/glycemia/views.py
class GlycemiaAPIView(generics.ListCreateAPIView):
def get_serializer_class(self):
if self.request.method == 'GET':
return GlycemiaSerializer
return GlycemiaListCreateSerializer |
@BenjaminHabert Thanks for that. |
@craiga yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have been using this proposed version for a few months. I think this change is useful and can be accepted
so, when you a planning to merge this PR to master? |
Any progress on this? |
As this project is deprecated, I'm closing this PR to make this clear to subsequent visitors. Check the project's readme for more info and an alternative library to use. |
@craiga Thanks for the response. What will be the other open issues and PRs? I think it would be better if you "archive" the project and make it read only. |
@ulgens I'm not sure. I have no special status in this project, I just happened to open a moderately popular pull request. ;) @marcgibbons What do you think of archiving this project? |
Makes it possible to ignore user permissions when generating a schema.
I have an endpoint which lists search results (
/v1/search_results/
), but I'm only given access if I specify a search ID on the query string (/v1/search_results/?search=456
). My code checks that the logged in user owns search456
before allowing the user to access this endpoint.Without this setting,
/v1/search_results/
won't appear in the generated documentation.