-
Notifications
You must be signed in to change notification settings - Fork 256
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
Refactor get_users API to show proper swagger documentation #762
Conversation
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
|
||
def get_queryset(self): | ||
try: | ||
facility = Facility.objects.get(external_id=self.kwargs.get("facility_external_id")) |
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.
@gigincg does this endpoint need authorisation?
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.
@gigincg reminder.
you can also add swagger docs by using the fake schema generator that YASG provides |
|
||
def get_queryset(self): | ||
try: | ||
facility = Facility.objects.get(external_id=self.kwargs.get("facility_external_id")) |
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.
@gigincg reminder.
Refactor the
get_users
API (under facility) to make the user role (user_type
) filter visible in the swagger UI.Fixes: #711