Skip to content

Commit

Permalink
Merge pull request #146 from Catrobat/create-pull-request/patch-17157…
Browse files Browse the repository at this point in the history
…60104

Bump autogenerated OpenAPI code
  • Loading branch information
dmetzner authored May 15, 2024
2 parents 570dfbd + 8cff09a commit fa3bd6b
Show file tree
Hide file tree
Showing 100 changed files with 424 additions and 828 deletions.
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4.0
7.5.0
2 changes: 1 addition & 1 deletion Api/ApiServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* API for the Catrobat Share Platform
*
* The version of the OpenAPI document: v1.4.2
* The version of the OpenAPI document: v1.4.3
* Contact: [email protected]
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
Expand Down
2 changes: 1 addition & 1 deletion Api/AuthenticationApiInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* API for the Catrobat Share Platform
*
* The version of the OpenAPI document: v1.4.2
* The version of the OpenAPI document: v1.4.3
* Contact: [email protected]
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
Expand Down
2 changes: 1 addition & 1 deletion Api/MediaLibraryApiInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* API for the Catrobat Share Platform
*
* The version of the OpenAPI document: v1.4.2
* The version of the OpenAPI document: v1.4.3
* Contact: [email protected]
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
Expand Down
2 changes: 1 addition & 1 deletion Api/NotificationsApiInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* API for the Catrobat Share Platform
*
* The version of the OpenAPI document: v1.4.2
* The version of the OpenAPI document: v1.4.3
* Contact: [email protected]
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
Expand Down
2 changes: 1 addition & 1 deletion Api/ProjectsApiInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* API for the Catrobat Share Platform
*
* The version of the OpenAPI document: v1.4.2
* The version of the OpenAPI document: v1.4.3
* Contact: [email protected]
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
Expand Down
2 changes: 1 addition & 1 deletion Api/SearchApiInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* API for the Catrobat Share Platform
*
* The version of the OpenAPI document: v1.4.2
* The version of the OpenAPI document: v1.4.3
* Contact: [email protected]
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
Expand Down
2 changes: 1 addition & 1 deletion Api/UserApiInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* API for the Catrobat Share Platform
*
* The version of the OpenAPI document: v1.4.2
* The version of the OpenAPI document: v1.4.3
* Contact: [email protected]
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
Expand Down
2 changes: 1 addition & 1 deletion Api/UtilityApiInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* API for the Catrobat Share Platform
*
* The version of the OpenAPI document: v1.4.2
* The version of the OpenAPI document: v1.4.3
* Contact: [email protected]
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
Expand Down
176 changes: 55 additions & 121 deletions Controller/AuthenticationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* API for the Catrobat Share Platform
*
* The version of the OpenAPI document: v1.4.2
* The version of the OpenAPI document: v1.4.3
* Contact: [email protected]
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
Expand Down Expand Up @@ -59,6 +59,8 @@ class AuthenticationController extends Controller
public function authenticationDeleteAction(Request $request)
{
// Handle authentication
// Authentication 'BearerAuth' required
// HTTP bearer authentication required
$securityBearerAuth = $request->headers->get('authorization');

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

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

// Find default response message
$message = '';

// Find a more specific message, if available
switch ($responseCode) {
case 200:
$message = 'OK';
break;
case 400:
$message = 'Bad request (Invalid, or missing parameters)';
break;
case 401:
$message = 'Refresh Token expired | Refresh Token has been used more than once (single use)';
break;
case 406:
$message = 'Not acceptable - client must accept application/json as content type';
break;
case 415:
$message = 'Unsupported Media Type - request must use application/json as content type';
break;
}
$message = match ($responseCode) {
200 => 'OK',
400 => 'Bad request (Invalid, or missing parameters)',
401 => 'Refresh Token expired | Refresh Token has been used more than once (single use)',
406 => 'Not acceptable - client must accept application/json as content type',
415 => 'Unsupported Media Type - request must use application/json as content type',
default => '',
};

return new Response(
'',
Expand Down Expand Up @@ -143,6 +132,8 @@ public function authenticationDeleteAction(Request $request)
public function authenticationGetAction(Request $request)
{
// Handle authentication
// Authentication 'BearerAuth' required
// HTTP bearer authentication required
$securityBearerAuth = $request->headers->get('authorization');

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

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

// Find default response message
$message = '';

// Find a more specific message, if available
switch ($responseCode) {
case 200:
$message = 'OK';
break;
case 401:
$message = 'Invalid JWT token | JWT token not found | JWT token expired';
break;
}
$message = match ($responseCode) {
200 => 'OK',
401 => 'Invalid JWT token | JWT token not found | JWT token expired',
default => '',
};

return new Response(
'',
Expand Down Expand Up @@ -252,30 +236,15 @@ public function authenticationOauthPostAction(Request $request)

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

// Find default response message
$message = '';

// Find a more specific message, if available
switch ($responseCode) {
case 200:
$message = 'OK';
break;
case 400:
$message = 'Bad request (Invalid, or missing parameters)';
break;
case 401:
$message = 'Invalid Client ID token';
break;
case 406:
$message = 'Not acceptable - client must accept application/json as content type';
break;
case 415:
$message = 'Unsupported Media Type - request must use application/json as content type';
break;
case 422:
$message = 'Unprocessable Entity';
break;
}
$message = match ($responseCode) {
200 => 'OK',
400 => 'Bad request (Invalid, or missing parameters)',
401 => 'Invalid Client ID token',
406 => 'Not acceptable - client must accept application/json as content type',
415 => 'Unsupported Media Type - request must use application/json as content type',
422 => 'Unprocessable Entity',
default => '',
};

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

// Handle authentication
// Authentication 'BearerAuth' required
// HTTP bearer authentication required
$securityBearerAuth = $request->headers->get('authorization');

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

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

// Find default response message
$message = '';

// Find a more specific message, if available
switch ($responseCode) {
case 200:
$message = 'OK';
break;
case 400:
$message = 'Bad request (Invalid, or missing parameters)';
break;
case 401:
$message = 'Invalid credentials';
break;
case 406:
$message = 'Not acceptable - client must accept application/json as content type';
break;
case 415:
$message = 'Unsupported Media Type - request must use application/json as content type';
break;
}
$message = match ($responseCode) {
200 => 'OK',
400 => 'Bad request (Invalid, or missing parameters)',
401 => 'Invalid credentials',
406 => 'Not acceptable - client must accept application/json as content type',
415 => 'Unsupported Media Type - request must use application/json as content type',
default => '',
};

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

// Handle authentication
// Authentication 'BearerAuth' required
// HTTP bearer authentication required
$securityBearerAuth = $request->headers->get('authorization');

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

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

// Find default response message
$message = '';

// Find a more specific message, if available
switch ($responseCode) {
case 200:
$message = 'OK';
break;
case 400:
$message = 'Bad request (Invalid, or missing parameters)';
break;
case 401:
$message = 'Refresh Token expired | Refresh Token has been used more than once (single use)';
break;
case 406:
$message = 'Not acceptable - client must accept application/json as content type';
break;
case 415:
$message = 'Unsupported Media Type - request must use application/json as content type';
break;
}
$message = match ($responseCode) {
200 => 'OK',
400 => 'Bad request (Invalid, or missing parameters)',
401 => 'Refresh Token expired | Refresh Token has been used more than once (single use)',
406 => 'Not acceptable - client must accept application/json as content type',
415 => 'Unsupported Media Type - request must use application/json as content type',
default => '',
};

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

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

// Find default response message
$message = '';

// Find a more specific message, if available
switch ($responseCode) {
case 200:
$message = 'OK';
break;
case 400:
$message = 'Bad request (Invalid, or missing parameters)';
break;
case 401:
$message = 'The provided deprecated upload token is invalid or has expired';
break;
case 406:
$message = 'Not acceptable - client must accept application/json as content type';
break;
case 415:
$message = 'Unsupported Media Type - request must use application/json as content type';
break;
}
$message = match ($responseCode) {
200 => 'OK',
400 => 'Bad request (Invalid, or missing parameters)',
401 => 'The provided deprecated upload token is invalid or has expired',
406 => 'Not acceptable - client must accept application/json as content type',
415 => 'Unsupported Media Type - request must use application/json as content type',
default => '',
};

return new Response(
null !== $result ? $this->serialize($result, $responseFormat) : '',
Expand Down
4 changes: 2 additions & 2 deletions Controller/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* API for the Catrobat Share Platform
*
* The version of the OpenAPI document: v1.4.2
* The version of the OpenAPI document: v1.4.3
* Contact: [email protected]
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
Expand Down Expand Up @@ -99,7 +99,7 @@ public function createErrorResponse(HttpException $exception): Response
$json = $this->exceptionToArray($exception);
$json['statusCode'] = $statusCode;

return new Response(json_encode($json, 15, 512), $statusCode, $headers);
return new Response(json_encode($json, 15), $statusCode, $headers);
}

/**
Expand Down
Loading

0 comments on commit fa3bd6b

Please sign in to comment.