core: add provider_obj field to applications API
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
cb048764f4
commit
8df29235bb
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in New Issue