Skip to content

Commit 8e39a84

Browse files
committed
added operationId
Signed-off-by: bidi47 <bidi@apidemia.com>
1 parent 9752de4 commit 8e39a84

4 files changed

Lines changed: 38 additions & 0 deletions

File tree

‎src/Admin/src/OpenAPI.php‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
*/
2828
#[OA\Get(
2929
path: '/admin',
30+
operationId: 'getAdminCollection',
3031
description: 'Authenticated (super)admin fetches a list of admin accounts',
3132
summary: 'Admin lists admin accounts',
3233
security: [['AuthToken' => []]],
@@ -98,6 +99,7 @@
9899
*/
99100
#[OA\Post(
100101
path: '/admin',
102+
operationId: 'postAdminResource',
101103
description: 'Authenticated (super)admin creates a new admin account',
102104
summary: 'Admin creates an admin account',
103105
security: [['AuthToken' => []]],
@@ -157,6 +159,7 @@
157159
*/
158160
#[OA\Delete(
159161
path: '/admin/{id}',
162+
operationId: 'deleteAdminResource',
160163
description: 'Authenticated (super)admin deletes an admin account identified by its id',
161164
summary: 'Admin deletes an admin account',
162165
security: [['AuthToken' => []]],
@@ -187,6 +190,7 @@
187190
*/
188191
#[OA\Get(
189192
path: '/admin/{id}',
193+
operationId: 'getAdminResource',
190194
description: 'Authenticated (super)admin fetches an admin account identified by its id',
191195
summary: 'Admin fetches an admin account',
192196
security: [['AuthToken' => []]],
@@ -218,6 +222,7 @@
218222
*/
219223
#[OA\Patch(
220224
path: '/admin/{id}',
225+
operationId: 'patchAdminResource',
221226
description: 'Authenticated (super)admin updates an existing admin account',
222227
summary: 'Admin updates an admin account',
223228
security: [['AuthToken' => []]],
@@ -284,6 +289,7 @@
284289
*/
285290
#[OA\Get(
286291
path: '/admin/role',
292+
operationId: 'getAdminRoleCollection',
287293
description: 'Authenticated (super)admin fetches a list of admin roles',
288294
summary: 'Admin lists admin roles',
289295
security: [['AuthToken' => []]],
@@ -352,6 +358,7 @@
352358
*/
353359
#[OA\Get(
354360
path: '/admin/role/{id}',
361+
operationId: 'getAdminRoleResource',
355362
description: 'Authenticated (super)admin fetches an admin role identified by its id',
356363
summary: 'Admin fetches an admin role',
357364
security: [['AuthToken' => []]],
@@ -383,6 +390,7 @@
383390
*/
384391
#[OA\Get(
385392
path: '/admin/account',
393+
operationId: 'getAdminAccountResource',
386394
description: 'Authenticated (super)admin fetches their own account data',
387395
summary: 'Admin fetches their own account',
388396
security: [['AuthToken' => []]],
@@ -401,6 +409,7 @@
401409
*/
402410
#[OA\Patch(
403411
path: '/admin/account',
412+
operationId: 'patchAdminAccountResource',
404413
description: 'Authenticated (super)admin updates their own account data',
405414
summary: 'Admin updates their own account',
406415
security: [['AuthToken' => []]],

‎src/App/src/OpenAPI.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515
#[OA\Get(
1616
path: '/',
17+
operationId: 'getIndexResource',
1718
description: 'API home page outputting default message',
1819
summary: 'API home page',
1920
tags: ['Home'],
@@ -35,6 +36,7 @@
3536
*/
3637
#[OA\Post(
3738
path: '/error-report',
39+
operationId: 'postErrorReportResource',
3840
description: 'Third-party application reports an error to the API',
3941
summary: 'Report an error to the API',
4042
security: [['ErrorReportingToken' => []]],

‎src/Security/src/OpenAPI.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*/
1414
#[OA\Post(
1515
path: '/security/generate-token',
16+
operationId: 'postGenerateToken',
1617
description: 'Client generates access token using username and password',
1718
summary: 'Generate access token',
1819
requestBody: new OA\RequestBody(
@@ -50,6 +51,7 @@
5051
*/
5152
#[OA\Post(
5253
path: '/security/refresh-token',
54+
operationId: 'postRefreshToken',
5355
description: 'Client refreshes access token using refresh token',
5456
summary: 'Refresh access token',
5557
requestBody: new OA\RequestBody(

‎src/User/src/OpenAPI.php‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
*/
4747
#[OA\Get(
4848
path: '/user',
49+
operationId: 'getUserCollection',
4950
description: 'Authenticated (super)admin fetches a list of user accounts',
5051
summary: 'Admin lists user accounts',
5152
security: [['AuthToken' => []]],
@@ -115,6 +116,7 @@
115116
*/
116117
#[OA\Post(
117118
path: '/user',
119+
operationId: 'postUserResource',
118120
description: 'Authenticated (super)admin creates a new user account',
119121
summary: 'Admin creates user account',
120122
security: [['AuthToken' => []]],
@@ -187,6 +189,7 @@
187189
*/
188190
#[OA\Delete(
189191
path: '/user/{id}',
192+
operationId: 'deleteUserResource',
190193
description: 'Authenticated (super)admin deletes (anonymizes) a user account identified by its id',
191194
summary: 'Admin deletes (anonymizes) user account',
192195
security: [['AuthToken' => []]],
@@ -217,6 +220,7 @@
217220
*/
218221
#[OA\Get(
219222
path: '/user/{id}',
223+
operationId: 'getUserResource',
220224
description: 'Authenticated (super)admin fetches a user account identified by its id',
221225
summary: 'Admin views user account',
222226
security: [['AuthToken' => []]],
@@ -248,6 +252,7 @@
248252
*/
249253
#[OA\Patch(
250254
path: '/user/{id}',
255+
operationId: 'patchUserResource',
251256
description: 'Authenticated (super)admin updates an existing user account',
252257
summary: 'Admin updates user account',
253258
security: [['AuthToken' => []]],
@@ -322,6 +327,7 @@
322327
*/
323328
#[OA\Delete(
324329
path: '/user/{id}/avatar',
330+
operationId: 'deleteUserAvatarResource',
325331
description: 'Authenticated (super)admin deletes a user avatar identified by user id',
326332
summary: 'Admin deletes user avatar',
327333
security: [['AuthToken' => []]],
@@ -352,6 +358,7 @@
352358
*/
353359
#[OA\Get(
354360
path: '/user/{id}/avatar',
361+
operationId: 'getUserAvatarResource',
355362
description: 'Authenticated (super)admin fetches a user avatar identified by user id',
356363
summary: 'Admin views user avatar',
357364
security: [['AuthToken' => []]],
@@ -383,6 +390,7 @@
383390
*/
384391
#[OA\Post(
385392
path: '/user/{id}/avatar',
393+
operationId: 'postUserAvatarResource',
386394
description: 'Authenticated (super)admin creates user avatar for user identified by user id',
387395
summary: 'Admin creates user avatar',
388396
security: [['AuthToken' => []]],
@@ -434,6 +442,7 @@
434442
*/
435443
#[OA\Get(
436444
path: '/user/role',
445+
operationId: 'getUserRoleCollection',
437446
description: 'Authenticated (super)admin fetches a list of user roles',
438447
summary: 'Admin lists user roles',
439448
security: [['AuthToken' => []]],
@@ -502,6 +511,7 @@
502511
*/
503512
#[OA\Get(
504513
path: '/user/role/{id}',
514+
operationId: 'getUserRoleResource',
505515
description: 'Authenticated (super)admin fetches a user role identified by its id',
506516
summary: 'Admin views user role',
507517
security: [['AuthToken' => []]],
@@ -533,6 +543,7 @@
533543
*/
534544
#[OA\Patch(
535545
path: '/user/{id}/activate',
546+
operationId: 'patchUserActivate',
536547
description: 'Authenticated (super)admin activates an existing user account',
537548
summary: 'Admin activates user account',
538549
security: [['AuthToken' => []]],
@@ -575,6 +586,7 @@
575586
*/
576587
#[OA\Patch(
577588
path: '/user/{id}/deactivate',
589+
operationId: 'patchUserDeactivate',
578590
description: 'Authenticated (super)admin deactivates an existing user account',
579591
summary: 'Admin deactivates user account',
580592
security: [['AuthToken' => []]],
@@ -612,6 +624,7 @@
612624
*/
613625
#[OA\Delete(
614626
path: '/user/account',
627+
operationId: 'deleteUserAccountResource',
615628
description: 'Authenticated user deletes (anonymizes) their own account',
616629
summary: 'User deletes (anonymizes) their own account',
617630
security: [['AuthToken' => []]],
@@ -633,6 +646,7 @@
633646
*/
634647
#[OA\Get(
635648
path: '/user/account',
649+
operationId: 'getUserAccountResource',
636650
description: 'Authenticated user fetches their own account data',
637651
summary: 'User fetches their own account',
638652
security: [['AuthToken' => []]],
@@ -651,6 +665,7 @@
651665
*/
652666
#[OA\Patch(
653667
path: '/user/account',
668+
operationId: 'patchUserAccountResource',
654669
description: 'Authenticated user updates their own account data',
655670
summary: 'User updates their own account',
656671
security: [['AuthToken' => []]],
@@ -704,6 +719,7 @@
704719
*/
705720
#[OA\Post(
706721
path: '/user/account',
722+
operationId: 'postUserAccountResource',
707723
description: 'Register user account',
708724
summary: 'Unauthenticated user registers new user account',
709725
requestBody: new OA\RequestBody(
@@ -764,6 +780,7 @@
764780
*/
765781
#[OA\Delete(
766782
path: '/user/account/avatar',
783+
operationId: 'deleteUserAccountAvatarResource',
767784
description: 'Authenticated user deletes their user avatar',
768785
summary: 'User deletes their own avatar',
769786
security: [['AuthToken' => []]],
@@ -785,6 +802,7 @@
785802
*/
786803
#[OA\Get(
787804
path: '/user/account/avatar',
805+
operationId: 'getUserAccountAvatarResource',
788806
description: 'Authenticated user fetches their own avatar',
789807
summary: 'User fetches their own avatar',
790808
security: [['AuthToken' => []]],
@@ -807,6 +825,7 @@
807825
*/
808826
#[OA\Post(
809827
path: '/user/account/avatar',
828+
operationId: 'postUserAccountAvatarResource',
810829
description: 'Authenticated user creates their own avatar',
811830
summary: 'User creates their own avatar',
812831
security: [['AuthToken' => []]],
@@ -844,6 +863,7 @@
844863
*/
845864
#[OA\Patch(
846865
path: '/user/account/activate/{hash}',
866+
operationId: 'patchUserAccountActivate',
847867
description: 'Unauthenticated user activates their account using the hash from an activation link',
848868
summary: 'Unauthenticated user activates their account',
849869
tags: ['ActivateUser'],
@@ -879,6 +899,7 @@
879899
*/
880900
#[OA\Post(
881901
path: '/user/account/activate',
902+
operationId: 'postUserAccountActivate',
882903
description: 'Unauthenticated user requests an account activation link by providing their email',
883904
summary: 'Unauthenticated user requests to activate account',
884905
requestBody: new OA\RequestBody(
@@ -925,6 +946,7 @@
925946
*/
926947
#[OA\Post(
927948
path: '/user/account/recover',
949+
operationId: 'postUserAccountRecover',
928950
description: 'Unauthenticated user recovers their identity by providing their email',
929951
summary: 'Unauthenticated user recovers their identity',
930952
requestBody: new OA\RequestBody(
@@ -966,6 +988,7 @@
966988
*/
967989
#[OA\Get(
968990
path: '/user/account/reset-password/{hash}',
991+
operationId: 'getUserAccountResetPasswordResource',
969992
description: 'Unauthenticated user fetches a reset password by its hash',
970993
summary: 'Unauthenticated user fetches reset password',
971994
tags: ['ResetPassword'],
@@ -1000,6 +1023,7 @@
10001023
*/
10011024
#[OA\Patch(
10021025
path: '/user/account/reset-password/{hash}',
1026+
operationId: 'patchUserAccountResetPasswordResource',
10031027
description: 'Unauthenticated user modifies their password using a reset password identified by its hash',
10041028
summary: 'Unauthenticated user modifies their password',
10051029
requestBody: new OA\RequestBody(
@@ -1061,6 +1085,7 @@
10611085
*/
10621086
#[OA\Post(
10631087
path: '/user/account/reset-password',
1088+
operationId: 'postUserAccountResetPasswordResource',
10641089
description: 'Unauthenticated user requests to reset their password by providing their email/identity',
10651090
summary: 'Unauthenticated user requests to modify their password',
10661091
requestBody: new OA\RequestBody(

0 commit comments

Comments
 (0)