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"""
|
"""Application Serializer"""
|
||||||
|
|
||||||
launch_url = SerializerMethodField()
|
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]:
|
def get_launch_url(self, instance: Application) -> Optional[str]:
|
||||||
"""Get generated launch URL"""
|
"""Get generated launch URL"""
|
||||||
|
@ -49,6 +49,7 @@ class ApplicationSerializer(ModelSerializer):
|
||||||
"name",
|
"name",
|
||||||
"slug",
|
"slug",
|
||||||
"provider",
|
"provider",
|
||||||
|
"provider_obj",
|
||||||
"launch_url",
|
"launch_url",
|
||||||
"meta_launch_url",
|
"meta_launch_url",
|
||||||
"meta_icon",
|
"meta_icon",
|
||||||
|
|
|
@ -14456,6 +14456,10 @@ definitions:
|
||||||
maxLength: 50
|
maxLength: 50
|
||||||
minLength: 1
|
minLength: 1
|
||||||
provider:
|
provider:
|
||||||
|
title: Provider
|
||||||
|
type: integer
|
||||||
|
x-nullable: true
|
||||||
|
provider_obj:
|
||||||
$ref: '#/definitions/Provider'
|
$ref: '#/definitions/Provider'
|
||||||
launch_url:
|
launch_url:
|
||||||
title: Launch url
|
title: Launch url
|
||||||
|
|
Reference in New Issue