Skip to content

Commit 9f1cbfd

Browse files
committed
Update with latest generator
1 parent b4c14ce commit 9f1cbfd

File tree

5 files changed

+31
-48
lines changed

5 files changed

+31
-48
lines changed

CustomApi/.openapi-generator/FILES

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.gitignore
2-
.openapi-generator-ignore
32
.php-cs-fixer.dist.php
43
.travis.yml
54
README.md
@@ -17,6 +16,3 @@ lib/Model/RealmsRealmProtocolOpenidConnectTokenPost200Response.php
1716
lib/Model/RealmsRealmProtocolOpenidConnectTokenPost400Response.php
1817
lib/ObjectSerializer.php
1918
phpunit.xml.dist
20-
test/Api/CustomApiTest.php
21-
test/Model/RealmsRealmProtocolOpenidConnectTokenPost200ResponseTest.php
22-
test/Model/RealmsRealmProtocolOpenidConnectTokenPost400ResponseTest.php

CustomApi/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ $apiInstance = new WebMI\KeycloakApiClient\CustomApi\Api\CustomApi(
5555
new GuzzleHttp\Client()
5656
);
5757
$realm = 'realm_example'; // string | realm name (not id!)
58-
$client_id = 'client_id_example'; // string | Client id
59-
$grant_type = 'grant_type_example'; // string | Grant Type
6058
$username = 'username_example'; // string | Username
6159
$password = 'password_example'; // string | User Password
60+
$client_id = 'client_id_example'; // string | Client id
61+
$grant_type = 'grant_type_example'; // string | Grant Type
6262
$refresh_token = 'refresh_token_example'; // string | Refresh Token
6363

6464
try {
65-
$result = $apiInstance->realmsRealmProtocolOpenidConnectTokenPost($realm, $client_id, $grant_type, $username, $password, $refresh_token);
65+
$result = $apiInstance->realmsRealmProtocolOpenidConnectTokenPost($realm, $username, $password, $client_id, $grant_type, $refresh_token);
6666
print_r($result);
6767
} catch (Exception $e) {
6868
echo 'Exception when calling CustomApi->realmsRealmProtocolOpenidConnectTokenPost: ', $e->getMessage(), PHP_EOL;

CustomApi/docs/Api/CustomApi.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth
1010
## `realmsRealmProtocolOpenidConnectTokenPost()`
1111

1212
```php
13-
realmsRealmProtocolOpenidConnectTokenPost($realm, $client_id, $grant_type, $username, $password, $refresh_token): \WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost200Response
13+
realmsRealmProtocolOpenidConnectTokenPost($realm, $username, $password, $client_id, $grant_type, $refresh_token): \WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost200Response
1414
```
1515

1616
Oidc Login
@@ -31,14 +31,14 @@ $apiInstance = new WebMI\KeycloakApiClient\CustomApi\Api\CustomApi(
3131
new GuzzleHttp\Client()
3232
);
3333
$realm = 'realm_example'; // string | realm name (not id!)
34-
$client_id = 'client_id_example'; // string | Client id
35-
$grant_type = 'grant_type_example'; // string | Grant Type
3634
$username = 'username_example'; // string | Username
3735
$password = 'password_example'; // string | User Password
36+
$client_id = 'client_id_example'; // string | Client id
37+
$grant_type = 'grant_type_example'; // string | Grant Type
3838
$refresh_token = 'refresh_token_example'; // string | Refresh Token
3939

4040
try {
41-
$result = $apiInstance->realmsRealmProtocolOpenidConnectTokenPost($realm, $client_id, $grant_type, $username, $password, $refresh_token);
41+
$result = $apiInstance->realmsRealmProtocolOpenidConnectTokenPost($realm, $username, $password, $client_id, $grant_type, $refresh_token);
4242
print_r($result);
4343
} catch (Exception $e) {
4444
echo 'Exception when calling CustomApi->realmsRealmProtocolOpenidConnectTokenPost: ', $e->getMessage(), PHP_EOL;
@@ -50,10 +50,10 @@ try {
5050
| Name | Type | Description | Notes |
5151
| ------------- | ------------- | ------------- | ------------- |
5252
| **realm** | **string**| realm name (not id!) | |
53-
| **client_id** | **string**| Client id | |
54-
| **grant_type** | **string**| Grant Type | |
5553
| **username** | **string**| Username | [optional] |
5654
| **password** | **string**| User Password | [optional] |
55+
| **client_id** | **string**| Client id | [optional] |
56+
| **grant_type** | **string**| Grant Type | [optional] |
5757
| **refresh_token** | **string**| Refresh Token | [optional] |
5858

5959
### Return type
@@ -66,7 +66,7 @@ No authorization required
6666

6767
### HTTP request headers
6868

69-
- **Content-Type**: `multipart/form-data`
69+
- **Content-Type**: `application/x-www-form-urlencoded`
7070
- **Accept**: `application/json`
7171

7272
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)

CustomApi/lib/Api/CustomApi.php

Lines changed: 20 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class CustomApi
7272
/** @var string[] $contentTypes **/
7373
public const contentTypes = [
7474
'realmsRealmProtocolOpenidConnectTokenPost' => [
75-
'multipart/form-data',
75+
'application/x-www-form-urlencoded',
7676
],
7777
];
7878

@@ -128,20 +128,20 @@ public function getConfig()
128128
* Oidc Login
129129
*
130130
* @param string $realm realm name (not id!) (required)
131-
* @param string $client_id Client id (required)
132-
* @param string $grant_type Grant Type (required)
133131
* @param string|null $username Username (optional)
134132
* @param string|null $password User Password (optional)
133+
* @param string|null $client_id Client id (optional)
134+
* @param string|null $grant_type Grant Type (optional)
135135
* @param string|null $refresh_token Refresh Token (optional)
136136
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'] to see the possible values for this operation
137137
*
138138
* @throws \WebMI\KeycloakApiClient\CustomApi\ApiException on non-2xx response or if the response body is not in the expected format
139139
* @throws \InvalidArgumentException
140140
* @return \WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost200Response|\WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost400Response|\WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost400Response
141141
*/
142-
public function realmsRealmProtocolOpenidConnectTokenPost($realm, $client_id, $grant_type, $username = null, $password = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
142+
public function realmsRealmProtocolOpenidConnectTokenPost($realm, $username = null, $password = null, $client_id = null, $grant_type = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
143143
{
144-
list($response) = $this->realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo($realm, $client_id, $grant_type, $username, $password, $refresh_token, $contentType);
144+
list($response) = $this->realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo($realm, $username, $password, $client_id, $grant_type, $refresh_token, $contentType);
145145
return $response;
146146
}
147147

@@ -151,20 +151,20 @@ public function realmsRealmProtocolOpenidConnectTokenPost($realm, $client_id, $g
151151
* Oidc Login
152152
*
153153
* @param string $realm realm name (not id!) (required)
154-
* @param string $client_id Client id (required)
155-
* @param string $grant_type Grant Type (required)
156154
* @param string|null $username Username (optional)
157155
* @param string|null $password User Password (optional)
156+
* @param string|null $client_id Client id (optional)
157+
* @param string|null $grant_type Grant Type (optional)
158158
* @param string|null $refresh_token Refresh Token (optional)
159159
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'] to see the possible values for this operation
160160
*
161161
* @throws \WebMI\KeycloakApiClient\CustomApi\ApiException on non-2xx response or if the response body is not in the expected format
162162
* @throws \InvalidArgumentException
163163
* @return array of \WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost200Response|\WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost400Response|\WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost400Response, HTTP status code, HTTP response headers (array of strings)
164164
*/
165-
public function realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo($realm, $client_id, $grant_type, $username = null, $password = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
165+
public function realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo($realm, $username = null, $password = null, $client_id = null, $grant_type = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
166166
{
167-
$request = $this->realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $client_id, $grant_type, $username, $password, $refresh_token, $contentType);
167+
$request = $this->realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $username, $password, $client_id, $grant_type, $refresh_token, $contentType);
168168

169169
try {
170170
$options = $this->createHttpClientOption();
@@ -351,19 +351,19 @@ public function realmsRealmProtocolOpenidConnectTokenPostWithHttpInfo($realm, $c
351351
* Oidc Login
352352
*
353353
* @param string $realm realm name (not id!) (required)
354-
* @param string $client_id Client id (required)
355-
* @param string $grant_type Grant Type (required)
356354
* @param string|null $username Username (optional)
357355
* @param string|null $password User Password (optional)
356+
* @param string|null $client_id Client id (optional)
357+
* @param string|null $grant_type Grant Type (optional)
358358
* @param string|null $refresh_token Refresh Token (optional)
359359
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'] to see the possible values for this operation
360360
*
361361
* @throws \InvalidArgumentException
362362
* @return \GuzzleHttp\Promise\PromiseInterface
363363
*/
364-
public function realmsRealmProtocolOpenidConnectTokenPostAsync($realm, $client_id, $grant_type, $username = null, $password = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
364+
public function realmsRealmProtocolOpenidConnectTokenPostAsync($realm, $username = null, $password = null, $client_id = null, $grant_type = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
365365
{
366-
return $this->realmsRealmProtocolOpenidConnectTokenPostAsyncWithHttpInfo($realm, $client_id, $grant_type, $username, $password, $refresh_token, $contentType)
366+
return $this->realmsRealmProtocolOpenidConnectTokenPostAsyncWithHttpInfo($realm, $username, $password, $client_id, $grant_type, $refresh_token, $contentType)
367367
->then(
368368
function ($response) {
369369
return $response[0];
@@ -377,20 +377,20 @@ function ($response) {
377377
* Oidc Login
378378
*
379379
* @param string $realm realm name (not id!) (required)
380-
* @param string $client_id Client id (required)
381-
* @param string $grant_type Grant Type (required)
382380
* @param string|null $username Username (optional)
383381
* @param string|null $password User Password (optional)
382+
* @param string|null $client_id Client id (optional)
383+
* @param string|null $grant_type Grant Type (optional)
384384
* @param string|null $refresh_token Refresh Token (optional)
385385
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'] to see the possible values for this operation
386386
*
387387
* @throws \InvalidArgumentException
388388
* @return \GuzzleHttp\Promise\PromiseInterface
389389
*/
390-
public function realmsRealmProtocolOpenidConnectTokenPostAsyncWithHttpInfo($realm, $client_id, $grant_type, $username = null, $password = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
390+
public function realmsRealmProtocolOpenidConnectTokenPostAsyncWithHttpInfo($realm, $username = null, $password = null, $client_id = null, $grant_type = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
391391
{
392392
$returnType = '\WebMI\KeycloakApiClient\CustomApi\Model\RealmsRealmProtocolOpenidConnectTokenPost200Response';
393-
$request = $this->realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $client_id, $grant_type, $username, $password, $refresh_token, $contentType);
393+
$request = $this->realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $username, $password, $client_id, $grant_type, $refresh_token, $contentType);
394394

395395
return $this->client
396396
->sendAsync($request, $this->createHttpClientOption())
@@ -432,17 +432,17 @@ function ($exception) {
432432
* Create request for operation 'realmsRealmProtocolOpenidConnectTokenPost'
433433
*
434434
* @param string $realm realm name (not id!) (required)
435-
* @param string $client_id Client id (required)
436-
* @param string $grant_type Grant Type (required)
437435
* @param string|null $username Username (optional)
438436
* @param string|null $password User Password (optional)
437+
* @param string|null $client_id Client id (optional)
438+
* @param string|null $grant_type Grant Type (optional)
439439
* @param string|null $refresh_token Refresh Token (optional)
440440
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'] to see the possible values for this operation
441441
*
442442
* @throws \InvalidArgumentException
443443
* @return \GuzzleHttp\Psr7\Request
444444
*/
445-
public function realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $client_id, $grant_type, $username = null, $password = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
445+
public function realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $username = null, $password = null, $client_id = null, $grant_type = null, $refresh_token = null, string $contentType = self::contentTypes['realmsRealmProtocolOpenidConnectTokenPost'][0])
446446
{
447447

448448
// verify the required parameter 'realm' is set
@@ -452,19 +452,7 @@ public function realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $client
452452
);
453453
}
454454

455-
// verify the required parameter 'client_id' is set
456-
if ($client_id === null || (is_array($client_id) && count($client_id) === 0)) {
457-
throw new \InvalidArgumentException(
458-
'Missing the required parameter $client_id when calling realmsRealmProtocolOpenidConnectTokenPost'
459-
);
460-
}
461455

462-
// verify the required parameter 'grant_type' is set
463-
if ($grant_type === null || (is_array($grant_type) && count($grant_type) === 0)) {
464-
throw new \InvalidArgumentException(
465-
'Missing the required parameter $grant_type when calling realmsRealmProtocolOpenidConnectTokenPost'
466-
);
467-
}
468456

469457

470458

@@ -509,7 +497,6 @@ public function realmsRealmProtocolOpenidConnectTokenPostRequest($realm, $client
509497
$formParams = array_merge($formParams, ObjectSerializer::toFormValue('refresh_token', $refresh_token));
510498
}
511499

512-
$multipart = true;
513500
$headers = $this->headerSelector->selectHeaders(
514501
['application/json', ],
515502
$contentType,

custom.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ paths:
2121
description: Realm name must be unique.
2222
requestBody:
2323
content:
24-
multipart/form-data:
24+
application/x-www-form-urlencoded:
2525
schema:
2626
oneOf:
2727
- $ref: '#/components/schemas/UsernamePasswordRequest'

0 commit comments

Comments
 (0)