From 2fbf06a1aa24d46fbb08fd343011ed7ae691bb64 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 27 Nov 2020 18:42:22 +0100 Subject: [PATCH] root: fix formatting, update swagger --- passbook/core/api/applications.py | 1 + passbook/policies/api.py | 1 - swagger.yaml | 49 +++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/passbook/core/api/applications.py b/passbook/core/api/applications.py index 79a207bf8..d52429908 100644 --- a/passbook/core/api/applications.py +++ b/passbook/core/api/applications.py @@ -65,6 +65,7 @@ class ApplicationViewSet(ModelViewSet): @action(detail=True) def metrics(self, request: Request, slug: str): + """Metrics for application logins""" # TODO: Check app read and audit read perms app = Application.objects.get(slug=slug) return Response( diff --git a/passbook/policies/api.py b/passbook/policies/api.py index 3a67ec42d..3c5a45b5d 100644 --- a/passbook/policies/api.py +++ b/passbook/policies/api.py @@ -1,5 +1,4 @@ """policy API Views""" -import django_filters.rest_framework from django.core.exceptions import ObjectDoesNotExist from rest_framework.serializers import ( ModelSerializer, diff --git a/swagger.yaml b/swagger.yaml index 0b223403b..8cf01d50b 100755 --- a/swagger.yaml +++ b/swagger.yaml @@ -280,6 +280,26 @@ paths: type: string format: slug pattern: ^[-a-zA-Z0-9_]+$ + /core/applications/{slug}/metrics/: + get: + operationId: core_applications_metrics + description: Metrics for application logins + parameters: [] + responses: + '200': + description: '' + schema: + $ref: '#/definitions/Application' + tags: + - core + parameters: + - name: slug + in: path + description: Internal application name, used in URLs. + required: true + type: string + format: slug + pattern: ^[-a-zA-Z0-9_]+$ /core/groups/: get: operationId: core_groups_list @@ -1715,6 +1735,31 @@ paths: operationId: policies_bindings_list description: PolicyBinding Viewset parameters: + - name: policy + in: query + description: '' + required: false + type: string + - name: target + in: query + description: '' + required: false + type: string + - name: enabled + in: query + description: '' + required: false + type: string + - name: order + in: query + description: '' + required: false + type: number + - name: timeout + in: query + description: '' + required: false + type: number - name: ordering in: query description: Which field to use when ordering the results. @@ -6741,6 +6786,10 @@ definitions: format: uuid readOnly: true uniqueItems: true + cache_count: + title: Cache count + type: string + readOnly: true Outpost: description: Outpost Serializer required: