diff --git a/authentik/core/api/groups.py b/authentik/core/api/groups.py index 801d5e618..2ca259fb4 100644 --- a/authentik/core/api/groups.py +++ b/authentik/core/api/groups.py @@ -2,20 +2,16 @@ from rest_framework.serializers import ModelSerializer from rest_framework.viewsets import ModelViewSet -from authentik.core.api.users import UserSerializer from authentik.core.models import Group class GroupSerializer(ModelSerializer): """Group Serializer""" - users = UserSerializer(many=True) - class Meta: model = Group fields = ["pk", "name", "is_superuser", "parent", "users", "attributes"] - depth = 2 class GroupViewSet(ModelViewSet): diff --git a/swagger.yaml b/swagger.yaml index 876f360ca..da9fcb68f 100755 --- a/swagger.yaml +++ b/swagger.yaml @@ -10934,7 +10934,42 @@ definitions: format: uuid readOnly: true uniqueItems: true + Group: + description: Group Serializer + required: + - name + - parent + - users + type: object + properties: + pk: + title: Group uuid + type: string + format: uuid + readOnly: true + name: + title: Name + type: string + maxLength: 80 + minLength: 1 + is_superuser: + title: Is superuser + description: Users added to this group will be superusers. + type: boolean + parent: + title: Parent + type: string + format: uuid + users: + type: array + items: + type: integer + uniqueItems: true + attributes: + title: Attributes + type: object User: + title: User description: User Serializer required: - username @@ -10985,88 +11020,6 @@ definitions: attributes: title: Attributes type: object - Group: - description: Group Serializer - required: - - name - - users - type: object - properties: - pk: - title: Group uuid - type: string - format: uuid - readOnly: true - name: - title: Name - type: string - maxLength: 80 - minLength: 1 - is_superuser: - title: Is superuser - description: Users added to this group will be superusers. - type: boolean - parent: - description: Custom Group model which supports a basic hierarchy - required: - - name - type: object - properties: - group_uuid: - title: Group uuid - type: string - format: uuid - readOnly: true - name: - title: Name - type: string - maxLength: 80 - minLength: 1 - is_superuser: - title: Is superuser - description: Users added to this group will be superusers. - type: boolean - attributes: - title: Attributes - type: object - parent: - description: Custom Group model which supports a basic hierarchy - required: - - name - - parent - type: object - properties: - group_uuid: - title: Group uuid - type: string - format: uuid - readOnly: true - name: - title: Name - type: string - maxLength: 80 - minLength: 1 - is_superuser: - title: Is superuser - description: Users added to this group will be superusers. - type: boolean - attributes: - title: Attributes - type: object - parent: - title: Parent - type: string - format: uuid - readOnly: true - readOnly: true - users: - description: '' - type: array - items: - $ref: '#/definitions/User' - attributes: - title: Attributes - type: object Token: description: Token Serializer required: