@@ -76,10 +76,8 @@ def result(self, request, pk=None):
76
76
request_body = openapi .Schema (
77
77
type = openapi .TYPE_OBJECT ,
78
78
required = ["sub_status" ],
79
- properties = {
80
- "sub_status" : openapi .Schema (type = openapi .TYPE_STRING )
81
- },
82
- description = "Value to populate the sub-status of a Job"
79
+ properties = {"sub_status" : openapi .Schema (type = openapi .TYPE_STRING )},
80
+ description = "Value to populate the sub-status of a Job" ,
83
81
),
84
82
responses = {
85
83
status .HTTP_200_OK : openapi .Response (
@@ -89,10 +87,10 @@ def result(self, request, pk=None):
89
87
properties = {
90
88
"message" : openapi .Schema (
91
89
type = openapi .TYPE_STRING ,
92
- example = "Sub status updated correctly"
90
+ example = "Sub status updated correctly" ,
93
91
)
94
- }
95
- )
92
+ },
93
+ ),
96
94
),
97
95
status .HTTP_400_BAD_REQUEST : openapi .Response (
98
96
description = "In case your request doesnt have a valid 'sub_status'." ,
@@ -101,10 +99,10 @@ def result(self, request, pk=None):
101
99
properties = {
102
100
"message" : openapi .Schema (
103
101
type = openapi .TYPE_STRING ,
104
- example = "'sub_status' not provided or is not valid"
102
+ example = "'sub_status' not provided or is not valid" ,
105
103
)
106
- }
107
- )
104
+ },
105
+ ),
108
106
),
109
107
status .HTTP_403_FORBIDDEN : openapi .Response (
110
108
description = "In case you cannot change the sub_status." ,
@@ -113,23 +111,23 @@ def result(self, request, pk=None):
113
111
properties = {
114
112
"message" : openapi .Schema (
115
113
type = openapi .TYPE_STRING ,
116
- example = "Cannot update 'sub_status' when is not in RUNNING status. (Currently PENDING)"
114
+ example = "Cannot update 'sub_status' when "
115
+ "is not in RUNNING status. (Currently PENDING)" ,
117
116
)
118
- }
119
- )
117
+ },
118
+ ),
120
119
),
121
120
status .HTTP_404_NOT_FOUND : openapi .Response (
122
121
description = "In case the job doesnt exist or you dont have access to it." ,
123
122
schema = openapi .Schema (
124
123
type = openapi .TYPE_OBJECT ,
125
124
properties = {
126
125
"message" : openapi .Schema (
127
- type = openapi .TYPE_STRING ,
128
- example = "Job [XXXX] not found"
126
+ type = openapi .TYPE_STRING , example = "Job [XXXX] not found"
129
127
)
130
- }
131
- )
132
- )
128
+ },
129
+ ),
130
+ ),
133
131
},
134
132
)
135
133
@action (methods = ["POST" ], detail = True )
0 commit comments