Skip to content
This repository was archived by the owner on Mar 28, 2025. It is now read-only.

Commit fa3bd6b

Browse files
authored
Merge pull request #146 from Catrobat/create-pull-request/patch-1715760104
Bump autogenerated OpenAPI code
2 parents 570dfbd + 8cff09a commit fa3bd6b

File tree

100 files changed

+424
-828
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+424
-828
lines changed

.openapi-generator/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.4.0
1+
7.5.0

Api/ApiServer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* API for the Catrobat Share Platform
1818
*
19-
* The version of the OpenAPI document: v1.4.2
19+
* The version of the OpenAPI document: v1.4.3
2020
* Contact: [email protected]
2121
* Generated by: https://github.com/openapitools/openapi-generator.git
2222
*/

Api/AuthenticationApiInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* API for the Catrobat Share Platform
1818
*
19-
* The version of the OpenAPI document: v1.4.2
19+
* The version of the OpenAPI document: v1.4.3
2020
* Contact: [email protected]
2121
* Generated by: https://github.com/openapitools/openapi-generator.git
2222
*/

Api/MediaLibraryApiInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* API for the Catrobat Share Platform
1818
*
19-
* The version of the OpenAPI document: v1.4.2
19+
* The version of the OpenAPI document: v1.4.3
2020
* Contact: [email protected]
2121
* Generated by: https://github.com/openapitools/openapi-generator.git
2222
*/

Api/NotificationsApiInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* API for the Catrobat Share Platform
1818
*
19-
* The version of the OpenAPI document: v1.4.2
19+
* The version of the OpenAPI document: v1.4.3
2020
* Contact: [email protected]
2121
* Generated by: https://github.com/openapitools/openapi-generator.git
2222
*/

Api/ProjectsApiInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* API for the Catrobat Share Platform
1818
*
19-
* The version of the OpenAPI document: v1.4.2
19+
* The version of the OpenAPI document: v1.4.3
2020
* Contact: [email protected]
2121
* Generated by: https://github.com/openapitools/openapi-generator.git
2222
*/

Api/SearchApiInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* API for the Catrobat Share Platform
1818
*
19-
* The version of the OpenAPI document: v1.4.2
19+
* The version of the OpenAPI document: v1.4.3
2020
* Contact: [email protected]
2121
* Generated by: https://github.com/openapitools/openapi-generator.git
2222
*/

Api/UserApiInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* API for the Catrobat Share Platform
1818
*
19-
* The version of the OpenAPI document: v1.4.2
19+
* The version of the OpenAPI document: v1.4.3
2020
* Contact: [email protected]
2121
* Generated by: https://github.com/openapitools/openapi-generator.git
2222
*/

Api/UtilityApiInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* API for the Catrobat Share Platform
1818
*
19-
* The version of the OpenAPI document: v1.4.2
19+
* The version of the OpenAPI document: v1.4.3
2020
* Contact: [email protected]
2121
* Generated by: https://github.com/openapitools/openapi-generator.git
2222
*/

Controller/AuthenticationController.php

+55-121
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* API for the Catrobat Share Platform
1818
*
19-
* The version of the OpenAPI document: v1.4.2
19+
* The version of the OpenAPI document: v1.4.3
2020
* Contact: [email protected]
2121
* Generated by: https://github.com/openapitools/openapi-generator.git
2222
*/
@@ -59,6 +59,8 @@ class AuthenticationController extends Controller
5959
public function authenticationDeleteAction(Request $request)
6060
{
6161
// Handle authentication
62+
// Authentication 'BearerAuth' required
63+
// HTTP bearer authentication required
6264
$securityBearerAuth = $request->headers->get('authorization');
6365

6466
// Read out all input parameter values into variables
@@ -94,27 +96,14 @@ public function authenticationDeleteAction(Request $request)
9496

9597
$handler->authenticationDelete($x_refresh, $responseCode, $responseHeaders);
9698

97-
// Find default response message
98-
$message = '';
99-
100-
// Find a more specific message, if available
101-
switch ($responseCode) {
102-
case 200:
103-
$message = 'OK';
104-
break;
105-
case 400:
106-
$message = 'Bad request (Invalid, or missing parameters)';
107-
break;
108-
case 401:
109-
$message = 'Refresh Token expired | Refresh Token has been used more than once (single use)';
110-
break;
111-
case 406:
112-
$message = 'Not acceptable - client must accept application/json as content type';
113-
break;
114-
case 415:
115-
$message = 'Unsupported Media Type - request must use application/json as content type';
116-
break;
117-
}
99+
$message = match ($responseCode) {
100+
200 => 'OK',
101+
400 => 'Bad request (Invalid, or missing parameters)',
102+
401 => 'Refresh Token expired | Refresh Token has been used more than once (single use)',
103+
406 => 'Not acceptable - client must accept application/json as content type',
104+
415 => 'Unsupported Media Type - request must use application/json as content type',
105+
default => '',
106+
};
118107

119108
return new Response(
120109
'',
@@ -143,6 +132,8 @@ public function authenticationDeleteAction(Request $request)
143132
public function authenticationGetAction(Request $request)
144133
{
145134
// Handle authentication
135+
// Authentication 'BearerAuth' required
136+
// HTTP bearer authentication required
146137
$securityBearerAuth = $request->headers->get('authorization');
147138

148139
// Read out all input parameter values into variables
@@ -163,18 +154,11 @@ public function authenticationGetAction(Request $request)
163154

164155
$handler->authenticationGet($responseCode, $responseHeaders);
165156

166-
// Find default response message
167-
$message = '';
168-
169-
// Find a more specific message, if available
170-
switch ($responseCode) {
171-
case 200:
172-
$message = 'OK';
173-
break;
174-
case 401:
175-
$message = 'Invalid JWT token | JWT token not found | JWT token expired';
176-
break;
177-
}
157+
$message = match ($responseCode) {
158+
200 => 'OK',
159+
401 => 'Invalid JWT token | JWT token not found | JWT token expired',
160+
default => '',
161+
};
178162

179163
return new Response(
180164
'',
@@ -252,30 +236,15 @@ public function authenticationOauthPostAction(Request $request)
252236

253237
$result = $handler->authenticationOauthPost($o_auth_login_request, $responseCode, $responseHeaders);
254238

255-
// Find default response message
256-
$message = '';
257-
258-
// Find a more specific message, if available
259-
switch ($responseCode) {
260-
case 200:
261-
$message = 'OK';
262-
break;
263-
case 400:
264-
$message = 'Bad request (Invalid, or missing parameters)';
265-
break;
266-
case 401:
267-
$message = 'Invalid Client ID token';
268-
break;
269-
case 406:
270-
$message = 'Not acceptable - client must accept application/json as content type';
271-
break;
272-
case 415:
273-
$message = 'Unsupported Media Type - request must use application/json as content type';
274-
break;
275-
case 422:
276-
$message = 'Unprocessable Entity';
277-
break;
278-
}
239+
$message = match ($responseCode) {
240+
200 => 'OK',
241+
400 => 'Bad request (Invalid, or missing parameters)',
242+
401 => 'Invalid Client ID token',
243+
406 => 'Not acceptable - client must accept application/json as content type',
244+
415 => 'Unsupported Media Type - request must use application/json as content type',
245+
422 => 'Unprocessable Entity',
246+
default => '',
247+
};
279248

280249
return new Response(
281250
null !== $result ? $this->serialize($result, $responseFormat) : '',
@@ -321,6 +290,8 @@ public function authenticationPostAction(Request $request)
321290
}
322291

323292
// Handle authentication
293+
// Authentication 'BearerAuth' required
294+
// HTTP bearer authentication required
324295
$securityBearerAuth = $request->headers->get('authorization');
325296

326297
// Read out all input parameter values into variables
@@ -358,27 +329,14 @@ public function authenticationPostAction(Request $request)
358329

359330
$result = $handler->authenticationPost($login_request, $responseCode, $responseHeaders);
360331

361-
// Find default response message
362-
$message = '';
363-
364-
// Find a more specific message, if available
365-
switch ($responseCode) {
366-
case 200:
367-
$message = 'OK';
368-
break;
369-
case 400:
370-
$message = 'Bad request (Invalid, or missing parameters)';
371-
break;
372-
case 401:
373-
$message = 'Invalid credentials';
374-
break;
375-
case 406:
376-
$message = 'Not acceptable - client must accept application/json as content type';
377-
break;
378-
case 415:
379-
$message = 'Unsupported Media Type - request must use application/json as content type';
380-
break;
381-
}
332+
$message = match ($responseCode) {
333+
200 => 'OK',
334+
400 => 'Bad request (Invalid, or missing parameters)',
335+
401 => 'Invalid credentials',
336+
406 => 'Not acceptable - client must accept application/json as content type',
337+
415 => 'Unsupported Media Type - request must use application/json as content type',
338+
default => '',
339+
};
382340

383341
return new Response(
384342
null !== $result ? $this->serialize($result, $responseFormat) : '',
@@ -424,6 +382,8 @@ public function authenticationRefreshPostAction(Request $request)
424382
}
425383

426384
// Handle authentication
385+
// Authentication 'BearerAuth' required
386+
// HTTP bearer authentication required
427387
$securityBearerAuth = $request->headers->get('authorization');
428388

429389
// Read out all input parameter values into variables
@@ -461,27 +421,14 @@ public function authenticationRefreshPostAction(Request $request)
461421

462422
$result = $handler->authenticationRefreshPost($refresh_request, $responseCode, $responseHeaders);
463423

464-
// Find default response message
465-
$message = '';
466-
467-
// Find a more specific message, if available
468-
switch ($responseCode) {
469-
case 200:
470-
$message = 'OK';
471-
break;
472-
case 400:
473-
$message = 'Bad request (Invalid, or missing parameters)';
474-
break;
475-
case 401:
476-
$message = 'Refresh Token expired | Refresh Token has been used more than once (single use)';
477-
break;
478-
case 406:
479-
$message = 'Not acceptable - client must accept application/json as content type';
480-
break;
481-
case 415:
482-
$message = 'Unsupported Media Type - request must use application/json as content type';
483-
break;
484-
}
424+
$message = match ($responseCode) {
425+
200 => 'OK',
426+
400 => 'Bad request (Invalid, or missing parameters)',
427+
401 => 'Refresh Token expired | Refresh Token has been used more than once (single use)',
428+
406 => 'Not acceptable - client must accept application/json as content type',
429+
415 => 'Unsupported Media Type - request must use application/json as content type',
430+
default => '',
431+
};
485432

486433
return new Response(
487434
null !== $result ? $this->serialize($result, $responseFormat) : '',
@@ -560,27 +507,14 @@ public function authenticationUpgradePostAction(Request $request)
560507

561508
$result = $handler->authenticationUpgradePost($upgrade_token_request, $responseCode, $responseHeaders);
562509

563-
// Find default response message
564-
$message = '';
565-
566-
// Find a more specific message, if available
567-
switch ($responseCode) {
568-
case 200:
569-
$message = 'OK';
570-
break;
571-
case 400:
572-
$message = 'Bad request (Invalid, or missing parameters)';
573-
break;
574-
case 401:
575-
$message = 'The provided deprecated upload token is invalid or has expired';
576-
break;
577-
case 406:
578-
$message = 'Not acceptable - client must accept application/json as content type';
579-
break;
580-
case 415:
581-
$message = 'Unsupported Media Type - request must use application/json as content type';
582-
break;
583-
}
510+
$message = match ($responseCode) {
511+
200 => 'OK',
512+
400 => 'Bad request (Invalid, or missing parameters)',
513+
401 => 'The provided deprecated upload token is invalid or has expired',
514+
406 => 'Not acceptable - client must accept application/json as content type',
515+
415 => 'Unsupported Media Type - request must use application/json as content type',
516+
default => '',
517+
};
584518

585519
return new Response(
586520
null !== $result ? $this->serialize($result, $responseFormat) : '',

Controller/Controller.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* API for the Catrobat Share Platform
1818
*
19-
* The version of the OpenAPI document: v1.4.2
19+
* The version of the OpenAPI document: v1.4.3
2020
* Contact: [email protected]
2121
* Generated by: https://github.com/openapitools/openapi-generator.git
2222
*/
@@ -99,7 +99,7 @@ public function createErrorResponse(HttpException $exception): Response
9999
$json = $this->exceptionToArray($exception);
100100
$json['statusCode'] = $statusCode;
101101

102-
return new Response(json_encode($json, 15, 512), $statusCode, $headers);
102+
return new Response(json_encode($json, 15), $statusCode, $headers);
103103
}
104104

105105
/**

0 commit comments

Comments
 (0)