Skip to content

Commit

Permalink
Merge pull request #51 from Catrobat/create-pull-request/patch-160629…
Browse files Browse the repository at this point in the history
…7673

Bump autogenerated OpenAPI code
  • Loading branch information
HCrane authored Nov 25, 2020
2 parents 768b596 + f53c2c4 commit bcba4be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
2 changes: 0 additions & 2 deletions Api/AuthenticationApiInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ public function authenticationGet(&$responseCode, array &$responseHeaders);
* @param OpenAPI\Server\Model\RefreshRequest $refresh_request (required)
* @param int $responseCode The HTTP response code to return
* @param array $responseHeaders Additional HTTP headers to return with the response ()
*
* @return OpenAPI\Server\Model\JWTResponse
*/
public function authenticationLogoutPost(RefreshRequest $refresh_request, &$responseCode, array &$responseHeaders);

Expand Down
15 changes: 2 additions & 13 deletions Controller/AuthenticationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,6 @@ public function authenticationLogoutPostAction(Request $request)
return new Response('', 415);
}

// Figure out what data format to return to the client
$produces = ['application/json'];
// Figure out what the client accepts
$clientAccepts = $request->headers->has('Accept') ? $request->headers->get('Accept') : '*/*';
$responseFormat = $this->getOutputFormat($clientAccepts, $produces);
if (null === $responseFormat)
{
return new Response('', 406);
}

// Handle authentication
// Authentication 'PandaAuth' required
// HTTP basic authentication required
Expand Down Expand Up @@ -181,7 +171,7 @@ public function authenticationLogoutPostAction(Request $request)
$handler->setPandaAuth($securityPandaAuth);

// Make the call to the business logic
$responseCode = 200;
$responseCode = 204;
$responseHeaders = [];
$result = $handler->authenticationLogoutPost($refresh_request, $responseCode, $responseHeaders);

Expand All @@ -208,12 +198,11 @@ public function authenticationLogoutPostAction(Request $request)
}

return new Response(
null !== $result ? $this->serialize($result, $responseFormat) : '',
'',
$responseCode,
array_merge(
$responseHeaders,
[
'Content-Type' => $responseFormat,
'X-OpenAPI-Message' => $message,
]
)
Expand Down
6 changes: 3 additions & 3 deletions Resources/docs/Api/AuthenticationApiInterface.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

## **authenticationLogoutPost**
> OpenAPI\Server\Model\JWTResponse authenticationLogoutPost($refresh_request)
> authenticationLogoutPost($refresh_request)
Expires refresh token

Expand Down Expand Up @@ -115,7 +115,7 @@ Name | Type | Description | Notes

### Return type

[**OpenAPI\Server\Model\JWTResponse**](../Model/JWTResponse.md)
void (empty response body)

### Authorization

Expand All @@ -124,7 +124,7 @@ Name | Type | Description | Notes
### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

Expand Down

0 comments on commit bcba4be

Please sign in to comment.