Skip to content

Commit 3ffbe19

Browse files
committed
Fixing annotations of some endpoints and generating new OAPI docs.
1 parent 160451b commit 3ffbe19

4 files changed

Lines changed: 52 additions & 23 deletions

File tree

app/V1Module/presenters/GroupInvitationsPresenter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ public function checkRemove($id)
103103
}
104104

105105
/**
106+
* Remove the invitation.
106107
* @DELETE
107108
*/
108109
#[Path("id", new VUuid(), "Identifier of the group invitation", required: true)]

app/V1Module/presenters/SecurityPresenter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class SecurityPresenter extends BasePresenter
2626
public $router;
2727

2828
/**
29+
* A preflight test whether given URL (and HTTP method) would be allowed by internal ACL checks
30+
* (for the current user).
2931
* @POST
3032
*/
3133
#[Post("url", new VMixed(), "URL of the resource that we are checking", required: true, nullable: true)]

app/V1Module/presenters/SisPresenter.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ class SisPresenter extends BasePresenter
8888

8989

9090
/**
91+
* Check SIS status for the current user.
92+
* @deprecated Use the new SIS extension instead
9193
* @GET
9294
* @throws ForbiddenRequestException
9395
*/
@@ -124,6 +126,7 @@ public function checkGetTerms()
124126

125127
/**
126128
* Get a list of all registered SIS terms
129+
* @deprecated Use the new SIS extension instead
127130
* @GET
128131
*/
129132
public function actionGetTerms()
@@ -140,6 +143,7 @@ public function checkRegisterTerm()
140143

141144
/**
142145
* Register a new term
146+
* @deprecated Use the new SIS extension instead
143147
* @POST
144148
* @throws InvalidApiArgumentException
145149
* @throws ForbiddenRequestException
@@ -176,6 +180,7 @@ public function checkEditTerm(string $id)
176180

177181
/**
178182
* Set details of a term
183+
* @deprecated Use the new SIS extension instead
179184
* @POST
180185
* @throws InvalidApiArgumentException
181186
* @throws NotFoundException
@@ -225,6 +230,7 @@ public function checkDeleteTerm(string $id)
225230

226231
/**
227232
* Delete a term
233+
* @deprecated Use the new SIS extension instead
228234
* @DELETE
229235
* @throws NotFoundException
230236
*/
@@ -252,6 +258,7 @@ public function checkSubscribedGroups($userId, $year, $term)
252258
* Organizational and archived groups are filtered out from the result.
253259
* Each course holds bound group IDs and group objects are returned in a separate array.
254260
* Whole ancestral closure of groups is returned, so the webapp may properly assemble hiarichial group names.
261+
* @deprecated Use the new SIS extension instead
255262
* @GET
256263
* @throws InvalidApiArgumentException
257264
* @throws BadRequestException
@@ -319,6 +326,7 @@ public function checkSupervisedCourses($userId, $year, $term)
319326
* Get supervised SIS courses and corresponding ReCodEx groups.
320327
* Each course holds bound group IDs and group objects are returned in a separate array.
321328
* Whole ancestral closure of groups is returned, so the webapp may properly assemble hiarichial group names.
329+
* @deprecated Use the new SIS extension instead
322330
* @GET
323331
* @throws InvalidApiArgumentException
324332
* @throws NotFoundException
@@ -411,6 +419,7 @@ private function makeCaptionsUnique(array &$captions, Group $parentGroup)
411419

412420
/**
413421
* Create a new group based on a SIS group
422+
* @deprecated Use the new SIS extension instead
414423
* @POST
415424
* @throws BadRequestException
416425
* @throws ForbiddenRequestException
@@ -488,6 +497,7 @@ public function actionCreateGroup($courseId)
488497

489498
/**
490499
* Bind an existing local group to a SIS group
500+
* @deprecated Use the new SIS extension instead
491501
* @POST
492502
* @throws ApiException
493503
* @throws ForbiddenRequestException
@@ -524,6 +534,7 @@ public function actionBindGroup($courseId)
524534

525535
/**
526536
* Delete a binding between a local group and a SIS group
537+
* @deprecated Use the new SIS extension instead
527538
* @DELETE
528539
* @throws BadRequestException
529540
* @throws ForbiddenRequestException
@@ -554,6 +565,7 @@ public function actionUnbindGroup($courseId, $groupId)
554565

555566
/**
556567
* Find groups that can be chosen as parents of a group created from given SIS group by current user
568+
* @deprecated Use the new SIS extension instead
557569
* @GET
558570
* @throws ApiException
559571
* @throws ForbiddenRequestException

docs/swagger.yaml

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ info:
66
paths:
77
/v1/security/check:
88
post:
9-
summary: '* @OA\Post(path="/v1/security/check", operationId="securityPresenterActionCheck", @OA\RequestBody(@OA\MediaType(mediaType="application/json",@OA\Schema(@OA\Property(property="url", type="string", nullable=true, description="URL of the resource that we are checking"), @OA\Property(property="method", type="string", nullable=true, description="The HTTP method"), required={"url","method"}))), @OA\Response(response="200",description="Placeholder response"))'
9+
summary: 'A preflight test whether given URL (and HTTP method) would be allowed by internal ACL checks (for the current user).'
10+
description: 'A preflight test whether given URL (and HTTP method) would be allowed by internal ACL checks (for the current user).'
1011
operationId: securityPresenterActionCheck
1112
requestBody:
1213
content:
@@ -3482,7 +3483,8 @@ paths:
34823483
'200':
34833484
description: 'Placeholder response'
34843485
delete:
3485-
summary: '* @OA\Delete(path="/v1/group-invitations/{id}", operationId="groupInvitationsPresenterActionRemove", @OA\Parameter(name="id", in="path", required=true, description="Identifier of the group invitation", @OA\Schema(type="string", nullable=false, pattern="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")), @OA\Response(response="200",description="Placeholder response"))'
3486+
summary: 'Remove the invitation.'
3487+
description: 'Remove the invitation.'
34863488
operationId: groupInvitationsPresenterActionRemove
34873489
parameters:
34883490
-
@@ -6465,22 +6467,25 @@ paths:
64656467
description: 'Placeholder response'
64666468
/v1/extensions/sis/status/:
64676469
get:
6468-
summary: '* @OA\Get(path="/v1/extensions/sis/status/", operationId="sisPresenterActionStatus", @OA\Response(response="200",description="Placeholder response"))'
6470+
summary: 'Check SIS status for the current user. [DEPRECATED]'
6471+
description: "Check SIS status for the current user.\n[DEPRECATED]: Use the new SIS extension instead"
64696472
operationId: sisPresenterActionStatus
64706473
responses:
64716474
'200':
64726475
description: 'Placeholder response'
6476+
deprecated: true
64736477
/v1/extensions/sis/terms/:
64746478
get:
6475-
summary: 'Get a list of all registered SIS terms'
6476-
description: 'Get a list of all registered SIS terms'
6479+
summary: 'Get a list of all registered SIS terms [DEPRECATED]'
6480+
description: "Get a list of all registered SIS terms\n[DEPRECATED]: Use the new SIS extension instead"
64776481
operationId: sisPresenterActionGetTerms
64786482
responses:
64796483
'200':
64806484
description: 'Placeholder response'
6485+
deprecated: true
64816486
post:
6482-
summary: 'Register a new term'
6483-
description: 'Register a new term'
6487+
summary: 'Register a new term [DEPRECATED]'
6488+
description: "Register a new term\n[DEPRECATED]: Use the new SIS extension instead"
64846489
operationId: sisPresenterActionRegisterTerm
64856490
requestBody:
64866491
content:
@@ -6502,10 +6507,11 @@ paths:
65026507
responses:
65036508
'200':
65046509
description: 'Placeholder response'
6510+
deprecated: true
65056511
'/v1/extensions/sis/terms/{id}':
65066512
post:
6507-
summary: 'Set details of a term'
6508-
description: 'Set details of a term'
6513+
summary: 'Set details of a term [DEPRECATED]'
6514+
description: "Set details of a term\n[DEPRECATED]: Use the new SIS extension instead"
65096515
operationId: sisPresenterActionEditTerm
65106516
parameters:
65116517
-
@@ -6544,9 +6550,10 @@ paths:
65446550
responses:
65456551
'200':
65466552
description: 'Placeholder response'
6553+
deprecated: true
65476554
delete:
6548-
summary: 'Delete a term'
6549-
description: 'Delete a term'
6555+
summary: 'Delete a term [DEPRECATED]'
6556+
description: "Delete a term\n[DEPRECATED]: Use the new SIS extension instead"
65506557
operationId: sisPresenterActionDeleteTerm
65516558
parameters:
65526559
-
@@ -6560,10 +6567,11 @@ paths:
65606567
responses:
65616568
'200':
65626569
description: 'Placeholder response'
6570+
deprecated: true
65636571
'/v1/extensions/sis/users/{userId}/subscribed-groups/{year}/{term}/as-student':
65646572
get:
6565-
summary: 'Get all courses subscirbed by a student and corresponding ReCodEx groups. Organizational and archived groups are filtered out from the result. Each course holds bound group IDs and group objects are returned in a separate array. Whole ancestral closure of groups is returned, so the webapp may properly assemble hiarichial group names.'
6566-
description: 'Get all courses subscirbed by a student and corresponding ReCodEx groups. Organizational and archived groups are filtered out from the result. Each course holds bound group IDs and group objects are returned in a separate array. Whole ancestral closure of groups is returned, so the webapp may properly assemble hiarichial group names.'
6573+
summary: 'Get all courses subscirbed by a student and corresponding ReCodEx groups. Organizational and archived groups are filtered out from the result. Each course holds bound group IDs and group objects are returned in a separate array. Whole ancestral closure of groups is returned, so the webapp may properly assemble hiarichial group names. [DEPRECATED]'
6574+
description: "Get all courses subscirbed by a student and corresponding ReCodEx groups. Organizational and archived groups are filtered out from the result. Each course holds bound group IDs and group objects are returned in a separate array. Whole ancestral closure of groups is returned, so the webapp may properly assemble hiarichial group names.\n[DEPRECATED]: Use the new SIS extension instead"
65676575
operationId: sisPresenterActionSubscribedCourses
65686576
parameters:
65696577
-
@@ -6593,10 +6601,11 @@ paths:
65936601
responses:
65946602
'200':
65956603
description: 'Placeholder response'
6604+
deprecated: true
65966605
'/v1/extensions/sis/users/{userId}/supervised-courses/{year}/{term}':
65976606
get:
6598-
summary: 'Get supervised SIS courses and corresponding ReCodEx groups. Each course holds bound group IDs and group objects are returned in a separate array. Whole ancestral closure of groups is returned, so the webapp may properly assemble hiarichial group names.'
6599-
description: 'Get supervised SIS courses and corresponding ReCodEx groups. Each course holds bound group IDs and group objects are returned in a separate array. Whole ancestral closure of groups is returned, so the webapp may properly assemble hiarichial group names.'
6607+
summary: 'Get supervised SIS courses and corresponding ReCodEx groups. Each course holds bound group IDs and group objects are returned in a separate array. Whole ancestral closure of groups is returned, so the webapp may properly assemble hiarichial group names. [DEPRECATED]'
6608+
description: "Get supervised SIS courses and corresponding ReCodEx groups. Each course holds bound group IDs and group objects are returned in a separate array. Whole ancestral closure of groups is returned, so the webapp may properly assemble hiarichial group names.\n[DEPRECATED]: Use the new SIS extension instead"
66006609
operationId: sisPresenterActionSupervisedCourses
66016610
parameters:
66026611
-
@@ -6626,10 +6635,11 @@ paths:
66266635
responses:
66276636
'200':
66286637
description: 'Placeholder response'
6638+
deprecated: true
66296639
'/v1/extensions/sis/remote-courses/{courseId}/possible-parents':
66306640
get:
6631-
summary: 'Find groups that can be chosen as parents of a group created from given SIS group by current user'
6632-
description: 'Find groups that can be chosen as parents of a group created from given SIS group by current user'
6641+
summary: 'Find groups that can be chosen as parents of a group created from given SIS group by current user [DEPRECATED]'
6642+
description: "Find groups that can be chosen as parents of a group created from given SIS group by current user\n[DEPRECATED]: Use the new SIS extension instead"
66336643
operationId: sisPresenterActionPossibleParents
66346644
parameters:
66356645
-
@@ -6643,10 +6653,11 @@ paths:
66436653
responses:
66446654
'200':
66456655
description: 'Placeholder response'
6656+
deprecated: true
66466657
'/v1/extensions/sis/remote-courses/{courseId}/create':
66476658
post:
6648-
summary: 'Create a new group based on a SIS group'
6649-
description: 'Create a new group based on a SIS group'
6659+
summary: 'Create a new group based on a SIS group [DEPRECATED]'
6660+
description: "Create a new group based on a SIS group\n[DEPRECATED]: Use the new SIS extension instead"
66506661
operationId: sisPresenterActionCreateGroup
66516662
parameters:
66526663
-
@@ -6672,10 +6683,11 @@ paths:
66726683
responses:
66736684
'200':
66746685
description: 'Placeholder response'
6686+
deprecated: true
66756687
'/v1/extensions/sis/remote-courses/{courseId}/bind':
66766688
post:
6677-
summary: 'Bind an existing local group to a SIS group'
6678-
description: 'Bind an existing local group to a SIS group'
6689+
summary: 'Bind an existing local group to a SIS group [DEPRECATED]'
6690+
description: "Bind an existing local group to a SIS group\n[DEPRECATED]: Use the new SIS extension instead"
66796691
operationId: sisPresenterActionBindGroup
66806692
parameters:
66816693
-
@@ -6701,10 +6713,11 @@ paths:
67016713
responses:
67026714
'200':
67036715
description: 'Placeholder response'
6716+
deprecated: true
67046717
'/v1/extensions/sis/remote-courses/{courseId}/bindings/{groupId}':
67056718
delete:
6706-
summary: 'Delete a binding between a local group and a SIS group'
6707-
description: 'Delete a binding between a local group and a SIS group'
6719+
summary: 'Delete a binding between a local group and a SIS group [DEPRECATED]'
6720+
description: "Delete a binding between a local group and a SIS group\n[DEPRECATED]: Use the new SIS extension instead"
67086721
operationId: sisPresenterActionUnbindGroup
67096722
parameters:
67106723
-
@@ -6726,6 +6739,7 @@ paths:
67266739
responses:
67276740
'200':
67286741
description: 'Placeholder response'
6742+
deprecated: true
67296743
/v1/emails:
67306744
post:
67316745
summary: 'Sends an email with provided subject and message to all ReCodEx users.'

0 commit comments

Comments
 (0)