Skip to content

Commit d8afa4a

Browse files
renovate[bot]BacLuc
authored andcommitted
fix(deps): update api-platform packages
1 parent 3cb462c commit d8afa4a

File tree

3 files changed

+44
-36
lines changed

3 files changed

+44
-36
lines changed

api/src/OpenApi/JwtDecorator.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
use ApiPlatform\OpenApi\Factory\OpenApiFactoryInterface;
66
use ApiPlatform\OpenApi\Model;
7+
use ApiPlatform\OpenApi\Model\Operation;
8+
use ApiPlatform\OpenApi\Model\RequestBody;
9+
use ApiPlatform\OpenApi\Model\Response;
710
use ApiPlatform\OpenApi\OpenApi;
811

912
/**
@@ -33,16 +36,16 @@ public function __invoke(array $context = []): OpenApi {
3336
$cookiePrefix = $this->cookiePrefix;
3437
$pathItem = new Model\PathItem(
3538
ref: 'JWT Token',
36-
post: new Model\Operation(
39+
post: new Operation(
3740
operationId: 'postCredentials',
3841
tags: ['Login'],
3942
responses: [
40-
'204' => [
41-
'description' => "Get a JWT token split across the two cookies {$cookiePrefix}jwt_hp and {$cookiePrefix}jwt_s. Also returns a refresh token in {$cookiePrefix}refresh_token",
42-
],
43+
'204' => new Response(
44+
description: "Get a JWT token split across the two cookies {$cookiePrefix}jwt_hp and {$cookiePrefix}jwt_s. Also returns a refresh token in {$cookiePrefix}refresh_token",
45+
),
4346
],
4447
summary: 'Log in using email and password.',
45-
requestBody: new Model\RequestBody(
48+
requestBody: new RequestBody(
4649
description: 'Generate new JWT Token by logging in',
4750
content: new \ArrayObject([
4851
'application/ld+json' => [

api/src/OpenApi/OAuthDecorator.php

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
namespace App\OpenApi;
44

55
use ApiPlatform\OpenApi\Factory\OpenApiFactoryInterface;
6-
use ApiPlatform\OpenApi\Model;
6+
use ApiPlatform\OpenApi\Model\Operation;
7+
use ApiPlatform\OpenApi\Model\Parameter;
8+
use ApiPlatform\OpenApi\Model\PathItem;
9+
use ApiPlatform\OpenApi\Model\Response;
710
use ApiPlatform\OpenApi\OpenApi;
811

912
/**
@@ -15,19 +18,19 @@ public function __construct(private OpenApiFactoryInterface $decorated) {}
1518
public function __invoke(array $context = []): OpenApi {
1619
$openApi = ($this->decorated)($context);
1720

18-
$pathItemGoogle = new Model\PathItem(
21+
$pathItemGoogle = new PathItem(
1922
ref: 'Google OAuth',
20-
get: new Model\Operation(
23+
get: new Operation(
2124
operationId: 'oauthGoogleRedirect',
2225
tags: ['OAuth'],
2326
responses: [
24-
'302' => [
25-
'description' => 'Redirect to the Google OAuth authorization endpoint',
26-
],
27+
'302' => new Response(
28+
description: 'Redirect to the Google OAuth authorization endpoint',
29+
),
2730
],
2831
summary: 'Log in using Google Oauth.',
2932
parameters: [
30-
new Model\Parameter(
33+
new Parameter(
3134
name: 'callback',
3235
in: 'path',
3336
schema: [
@@ -39,19 +42,19 @@ public function __invoke(array $context = []): OpenApi {
3942
);
4043
$openApi->getPaths()->addPath('/auth/google', $pathItemGoogle);
4144

42-
$pathItemPbsmidata = new Model\PathItem(
45+
$pathItemPbsmidata = new PathItem(
4346
ref: 'PBS MiData OAuth',
44-
get: new Model\Operation(
47+
get: new Operation(
4548
operationId: 'oauthPbsmidataRedirect',
4649
tags: ['OAuth'],
4750
responses: [
48-
'302' => [
49-
'description' => 'Redirect to the PBS MiData OAuth authorization endpoint',
50-
],
51+
'302' => new Response(
52+
description: 'Redirect to the PBS MiData OAuth authorization endpoint',
53+
),
5154
],
5255
summary: 'Log in using PBS MiData Oauth.',
5356
parameters: [
54-
new Model\Parameter(
57+
new Parameter(
5558
name: 'callback',
5659
in: 'path',
5760
schema: [
@@ -63,19 +66,19 @@ public function __invoke(array $context = []): OpenApi {
6366
);
6467
$openApi->getPaths()->addPath('/auth/pbsmidata', $pathItemPbsmidata);
6568

66-
$pathItemCevidb = new Model\PathItem(
69+
$pathItemCevidb = new PathItem(
6770
ref: 'CeviDB OAuth',
68-
get: new Model\Operation(
71+
get: new Operation(
6972
operationId: 'oauthCevidbRedirect',
7073
tags: ['OAuth'],
7174
responses: [
72-
'302' => [
73-
'description' => 'Redirect to the CeviDB OAuth authorization endpoint',
74-
],
75+
'302' => new Response(
76+
description: 'Redirect to the CeviDB OAuth authorization endpoint',
77+
),
7578
],
7679
summary: 'Log in using CeviDB Oauth.',
7780
parameters: [
78-
new Model\Parameter(
81+
new Parameter(
7982
name: 'callback',
8083
in: 'path',
8184
schema: [
@@ -87,19 +90,19 @@ public function __invoke(array $context = []): OpenApi {
8790
);
8891
$openApi->getPaths()->addPath('/auth/cevidb', $pathItemCevidb);
8992

90-
$pathItemJubladb = new Model\PathItem(
93+
$pathItemJubladb = new PathItem(
9194
ref: 'JublaDB OAuth',
92-
get: new Model\Operation(
95+
get: new Operation(
9396
operationId: 'oauthJubladbRedirect',
9497
tags: ['OAuth'],
9598
responses: [
96-
'302' => [
97-
'description' => 'Redirect to the JublaDB OAuth authorization endpoint',
98-
],
99+
'302' => new Response(
100+
description: 'Redirect to the JublaDB OAuth authorization endpoint',
101+
),
99102
],
100103
summary: 'Log in using JublaDB Oauth.',
101104
parameters: [
102-
new Model\Parameter(
105+
new Parameter(
103106
name: 'callback',
104107
in: 'path',
105108
schema: [

api/src/OpenApi/RefreshTokenDecorator.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
namespace App\OpenApi;
44

55
use ApiPlatform\OpenApi\Factory\OpenApiFactoryInterface;
6-
use ApiPlatform\OpenApi\Model;
6+
use ApiPlatform\OpenApi\Model\Operation;
7+
use ApiPlatform\OpenApi\Model\PathItem;
8+
use ApiPlatform\OpenApi\Model\Response;
79
use ApiPlatform\OpenApi\OpenApi;
810

911
final readonly class RefreshTokenDecorator implements OpenApiFactoryInterface {
@@ -13,15 +15,15 @@ public function __invoke(array $context = []): OpenApi {
1315
$openApi = ($this->decorated)($context);
1416

1517
$cookiePrefix = $this->cookiePrefix;
16-
$pathItem = new Model\PathItem(
18+
$pathItem = new PathItem(
1719
ref: 'JWT Token Refresh',
18-
post: new Model\Operation(
20+
post: new Operation(
1921
operationId: 'postRefreshToken',
2022
tags: ['JWT Refresh'],
2123
responses: [
22-
'204' => [
23-
'description' => "Get a refreshed JWT token split across the two cookies {$cookiePrefix}jwt_hp and {$cookiePrefix}jwt_s. Also returns a new refresh token {$cookiePrefix}refresh_token.",
24-
],
24+
'204' => new Response(
25+
description: "Get a refreshed JWT token split across the two cookies {$cookiePrefix}jwt_hp and {$cookiePrefix}jwt_s. Also returns a new refresh token {$cookiePrefix}refresh_token.",
26+
),
2527
],
2628
summary: 'Refresh token.',
2729
),

0 commit comments

Comments
 (0)