From 8df29235bb40e6fcc9456b2db9cc8b489ac33b4b Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 11 Apr 2021 13:31:31 +0200 Subject: [PATCH] core: add provider_obj field to applications API Signed-off-by: Jens Langhammer --- authentik/core/api/applications.py | 3 ++- swagger.yaml | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/authentik/core/api/applications.py b/authentik/core/api/applications.py index 504c3e591..e05568f77 100644 --- a/authentik/core/api/applications.py +++ b/authentik/core/api/applications.py @@ -35,7 +35,7 @@ class ApplicationSerializer(ModelSerializer): """Application Serializer""" launch_url = SerializerMethodField() - provider = ProviderSerializer(source="get_provider", required=False) + provider_obj = ProviderSerializer(source="get_provider", required=False) def get_launch_url(self, instance: Application) -> Optional[str]: """Get generated launch URL""" @@ -49,6 +49,7 @@ class ApplicationSerializer(ModelSerializer): "name", "slug", "provider", + "provider_obj", "launch_url", "meta_launch_url", "meta_icon", diff --git a/swagger.yaml b/swagger.yaml index 4f332e4e0..47fc0b70c 100755 --- a/swagger.yaml +++ b/swagger.yaml @@ -14456,6 +14456,10 @@ definitions: maxLength: 50 minLength: 1 provider: + title: Provider + type: integer + x-nullable: true + provider_obj: $ref: '#/definitions/Provider' launch_url: title: Launch url