Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Swagger api doc issue #225

Merged

Conversation

aagman945
Copy link
Contributor

fixes #169

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aagman945 can you please add a couple of tests to avoid the coverage to decrease and hence fail the build?

Comment on lines +52 to +53
if self.request.user.is_anonymous:
return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nemesisdesign I don't think these changes makes much logical sense. The permission_classes of this view contains IsAuthenticated. Therefore, this view will not be visible to AnonymousUser.

Regarding swagger issues, it only allows unauthenticated user to open API docs when DEBUG is set to True. Since that only occurs in the test project and not in deployments (ansible-openwisp2), we should consider updating settings of the project to ignore that issue.

https://github.com/openwisp/openwisp-utils/blob/4d9e83ae44ae7a82276fae2ceaf2a82ed99ffa5c/openwisp_utils/api/urls.py#L11-L17

@codesankalp codesankalp changed the base branch from master to issues/169-fix-swagger-docs March 15, 2022 16:37
@codesankalp codesankalp merged commit d639440 into openwisp:issues/169-fix-swagger-docs Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[api] Fix swagger API docs issues
4 participants