Skip to content
Snippets Groups Projects
Verified Commit fe42a646 authored by Erwan Rouchet's avatar Erwan Rouchet
Browse files

Disambiguate the two process IDs in the ApplyProcessTemplate API docs

parent 867492a8
No related branches found
No related tags found
1 merge request!1887Disambiguate the two process IDs in the ApplyProcessTemplate API docs
......@@ -1752,8 +1752,17 @@ class CreateProcessTemplate(ProcessACLMixin, WorkerACLMixin, CreateAPIView):
@extend_schema_view(post=extend_schema(
operation_id='ApplyProcessTemplate',
parameters=[
OpenApiParameter(
'id',
type=UUID,
location=OpenApiParameter.PATH,
description='ID of the template to apply',
required=True,
),
],
responses={200: ProcessSerializer, 403: None},
tags=['process']
tags=['process'],
))
class ApplyProcessTemplate(ProcessACLMixin, WorkerACLMixin, CreateAPIView):
"""
......
......@@ -286,7 +286,12 @@ class CreateProcessTemplateSerializer(serializers.ModelSerializer):
class ApplyProcessTemplateSerializer(ProcessACLMixin, serializers.Serializer):
process_id = serializers.PrimaryKeyRelatedField(queryset=Process.objects.all(), source='process', required=True)
process_id = serializers.PrimaryKeyRelatedField(
queryset=Process.objects.all(),
source='process',
required=True,
help_text='ID of the process to apply the template to',
)
def create(self, validated_data):
# The endpoint should copy all the worker runs content from the source template
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment