Skip to content

Commit 1d4c89a

Browse files
committed
Fix swagger, make login_name snake case
1 parent 1cda411 commit 1d4c89a

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
},
3737
"require": {
3838
"php": "^8.1",
39-
"phplist/core": "v5.0.0-alpha8",
39+
"phplist/core": "dev-main",
4040
"friendsofsymfony/rest-bundle": "*",
4141
"symfony/test-pack": "^1.0",
4242
"symfony/process": "^6.4",

config/services/validators.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
services:
22
PhpList\RestBundle\Common\Validator\RequestValidator:
3-
autowire: true
4-
autoconfigure: true
5-
public: false
3+
arguments:
4+
$serializer: '@Symfony\Component\Serializer\Normalizer\ObjectNormalizer'
5+
$validator: '@validator'
66

77
PhpList\RestBundle\Identity\Validator\Constraint\UniqueEmailValidator:
88
autowire: true

src/Identity/Request/CreateAdministratorRequest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
use PhpList\Core\Domain\Identity\Model\Administrator;
88
use PhpList\Core\Domain\Identity\Model\Dto\CreateAdministratorDto;
9-
use PhpList\Core\Domain\Identity\Model\PrivilegeFlag;
109
use PhpList\RestBundle\Common\Request\RequestInterface;
1110
use PhpList\RestBundle\Identity\Validator\Constraint\UniqueEmail;
1211
use PhpList\RestBundle\Identity\Validator\Constraint\UniqueLoginName;

src/Messaging/OpenApi/SwaggerSchemasResponse.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@
7070
properties: [
7171
new OA\Property(property: 'html_formated', type: 'boolean'),
7272
new OA\Property(property: 'send_format', type: 'string', example: 'text', nullable: true),
73-
new OA\Property(property: 'as_text', type: 'boolean', example: true),
74-
new OA\Property(property: 'as_html', type: 'boolean'),
75-
new OA\Property(property: 'as_pdf', type: 'boolean'),
76-
new OA\Property(property: 'as_text_and_html', type: 'boolean'),
77-
new OA\Property(property: 'as_text_and_pdf', type: 'boolean'),
73+
new OA\Property(property: 'format_options', type: 'array', example: ['as_html', 'as_text']),
7874
],
7975
type: 'object'
8076
),

tests/Integration/Identity/Controller/SessionControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function testPostSessionsWithInvalidCredentialsReturnsNotAuthorized()
102102

103103
$loginName = 'john.doe';
104104
$password = 'a sandwich and a cup of coffee';
105-
$jsonData = ['loginName' => $loginName, 'password' => $password];
105+
$jsonData = ['login_name' => $loginName, 'password' => $password];
106106

107107
$this->jsonRequest('post', '/api/v2/sessions', [], [], [], json_encode($jsonData));
108108

0 commit comments

Comments
 (0)