root: fix formatting, update swagger
This commit is contained in:
parent
55f2ae5d08
commit
2fbf06a1aa
|
@ -65,6 +65,7 @@ class ApplicationViewSet(ModelViewSet):
|
||||||
|
|
||||||
@action(detail=True)
|
@action(detail=True)
|
||||||
def metrics(self, request: Request, slug: str):
|
def metrics(self, request: Request, slug: str):
|
||||||
|
"""Metrics for application logins"""
|
||||||
# TODO: Check app read and audit read perms
|
# TODO: Check app read and audit read perms
|
||||||
app = Application.objects.get(slug=slug)
|
app = Application.objects.get(slug=slug)
|
||||||
return Response(
|
return Response(
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
"""policy API Views"""
|
"""policy API Views"""
|
||||||
import django_filters.rest_framework
|
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
from rest_framework.serializers import (
|
from rest_framework.serializers import (
|
||||||
ModelSerializer,
|
ModelSerializer,
|
||||||
|
|
49
swagger.yaml
49
swagger.yaml
|
@ -280,6 +280,26 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
format: slug
|
format: slug
|
||||||
pattern: ^[-a-zA-Z0-9_]+$
|
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/:
|
/core/groups/:
|
||||||
get:
|
get:
|
||||||
operationId: core_groups_list
|
operationId: core_groups_list
|
||||||
|
@ -1715,6 +1735,31 @@ paths:
|
||||||
operationId: policies_bindings_list
|
operationId: policies_bindings_list
|
||||||
description: PolicyBinding Viewset
|
description: PolicyBinding Viewset
|
||||||
parameters:
|
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
|
- name: ordering
|
||||||
in: query
|
in: query
|
||||||
description: Which field to use when ordering the results.
|
description: Which field to use when ordering the results.
|
||||||
|
@ -6741,6 +6786,10 @@ definitions:
|
||||||
format: uuid
|
format: uuid
|
||||||
readOnly: true
|
readOnly: true
|
||||||
uniqueItems: true
|
uniqueItems: true
|
||||||
|
cache_count:
|
||||||
|
title: Cache count
|
||||||
|
type: string
|
||||||
|
readOnly: true
|
||||||
Outpost:
|
Outpost:
|
||||||
description: Outpost Serializer
|
description: Outpost Serializer
|
||||||
required:
|
required:
|
||||||
|
|
Reference in a new issue