From 66ec291f1603a301da20fcf71c6309f1a3232de4 Mon Sep 17 00:00:00 2001 From: Doston Toirov <31990136+Dostonbek1@users.noreply.github.com> Date: Wed, 4 Oct 2023 10:58:04 -0400 Subject: [PATCH] chore: Fix Delete Decision Environment response type (#431) * Add response types to Delete DE endpoint in dictionary format --- src/aap_eda/api/views/decision_environment.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/aap_eda/api/views/decision_environment.py b/src/aap_eda/api/views/decision_environment.py index 480b37362..cda9cad39 100644 --- a/src/aap_eda/api/views/decision_environment.py +++ b/src/aap_eda/api/views/decision_environment.py @@ -113,7 +113,14 @@ def retrieve(self, request, pk): @extend_schema( description="Delete a decision environment by id", - responses=status.HTTP_204_NO_CONTENT, + responses={ + status.HTTP_204_NO_CONTENT: OpenApiResponse( + None, description="Delete successful." + ), + status.HTTP_403_FORBIDDEN: OpenApiResponse( + None, description="Decision Environment in use by Activations." + ), + }, parameters=[ OpenApiParameter( name="force",