Skip to content

Commit 26076f3

Browse files
FoorackMiner28
andauthored
Implement remaining Group API endpoints (vrchatapi#208)
* Update paths.yaml * Sort Group endpoints * List Announcements * GroupRequestAction * Create Announcement * GroupAlreadyMemberError * Does not return list of announcements * Announcements * Clear Announcement * Started Audit logs * Member Endpoint * Group Member Roles Endpoint * Update CreateGroupAnnouncementRequest.yaml * Add endpoints to path.yaml * GroupMemberStatus * Update UpdateGroupMemberRequest.yaml * Group Kick and Ban endpoints * Fix Group Object * GroupRoleIDList * Group Audit Log * Group List Available Permissions * WIP on Linting * Remove broken lint rule * Gallery API * Cursed stuff all the way * Update UpdateGroupGalleryRequest.yaml * extra fiels to create and update group * GroupGalleryImageDeleteForbiddenError * Update paths.yaml Co-authored-by: Miner28 <[email protected]>
1 parent 6d74672 commit 26076f3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1062
-137
lines changed

.spectral.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ formats:
44
extends:
55
- 'spectral:oas'
66

7-
functions: [
8-
print,
9-
schema_object_name_mismatch_filename,
10-
]
11-
127
rules:
138
oas3-parameter-description: info
149
tag-description: hint
@@ -48,12 +43,3 @@ rules:
4843
resolved: false
4944
then:
5045
function: undefined
51-
52-
# Fetch ALL objects which have "title", and check if the filename matches the title
53-
schema-object-name-mismatch-filename:
54-
# Recursively fetch "json.schema" objects that has a "title" field
55-
given: "$.paths.[*][get,post,put,delete]..[?(@ != null && @.title)]"
56-
severity: error
57-
resolved: true
58-
then:
59-
function: schema_object_name_mismatch_filename

functions/print.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

functions/schema_object_name_mismatch_filename.js

Lines changed: 0 additions & 50 deletions
This file was deleted.

openapi/components/parameters.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,22 @@ order:
3030
schema:
3131
$ref: ./schemas/OrderOption.yaml
3232
description: Result ordering
33+
startDate:
34+
name: startDate
35+
in: query
36+
required: false
37+
schema:
38+
type: string
39+
format: date-time
40+
description: The start date of the search range.
41+
endDate:
42+
name: endDate
43+
in: query
44+
required: false
45+
schema:
46+
type: string
47+
format: date-time
48+
description: The end date of the search range.
3349
releaseStatus:
3450
name: releaseStatus
3551
in: query
@@ -71,6 +87,24 @@ groupRoleId:
7187
example: grol_00000000-0000-0000-0000-000000000000
7288
pattern: 'grol_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'
7389
description: Must be a valid group role ID.
90+
groupGalleryId:
91+
name: groupGalleryId
92+
in: path
93+
required: true
94+
schema:
95+
type: string
96+
example: ggal_00000000-0000-0000-0000-000000000000
97+
pattern: 'ggal_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'
98+
description: Must be a valid group gallery ID.
99+
groupGalleryImageId:
100+
name: groupGalleryImageId
101+
in: path
102+
required: true
103+
schema:
104+
type: string
105+
example: ggim_00000000-0000-0000-0000-000000000000
106+
pattern: 'ggim_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'
107+
description: Must be a valid group gallery image ID.
74108
versionId:
75109
name: versionId
76110
in: path

openapi/components/paths.yaml

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,22 +98,48 @@
9898
$ref: "./paths/groups.yaml#/paths/~1groups"
9999
"/groups/{groupId}":
100100
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}"
101-
"/groups/{groupId}/roles":
102-
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1roles"
103-
"/groups/{groupId}/members":
104-
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1members"
105-
"/groups/{groupId}/roles/{groupRoleId}":
106-
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1roles~1{groupRoleId}"
101+
"/groups/{groupId}/announcement":
102+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1announcement"
103+
"/groups/{groupId}/auditLogs":
104+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1auditLogs"
105+
"/groups/{groupId}/bans":
106+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1bans"
107+
"/groups/{groupId}/bans/{userId}":
108+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1bans~1{userId}"
109+
"/groups/{groupId}/galleries":
110+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1galleries"
111+
"/groups/{groupId}/galleries/{groupGalleryId}":
112+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1galleries~1{groupGalleryId}"
113+
"/groups/{groupId}/galleries/{groupGalleryId}/images":
114+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1galleries~1{groupGalleryId}~1images"
115+
"/groups/{groupId}/galleries/{groupGalleryId}/images/{groupGalleryImageId}":
116+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1galleries~1{groupGalleryId}~1images~1{groupGalleryImageId}"
117+
# "/groups/{groupId}/instances":
118+
# $ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1instances"
119+
"/groups/{groupId}/invites":
120+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1invites"
121+
"/groups/{groupId}/invites/{userId}":
122+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1invites~1{userId}"
107123
"/groups/{groupId}/join":
108124
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1join"
109125
"/groups/{groupId}/leave":
110126
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1leave"
127+
"/groups/{groupId}/members":
128+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1members"
129+
'/groups/{groupId}/members/{userId}':
130+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1members~1{userId}"
131+
'/groups/{groupId}/members/{userId}/roles/{groupRoleId}':
132+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1members~1{userId}~1roles~1{groupRoleId}"
133+
"/groups/{groupId}/permissions":
134+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1permissions"
111135
"/groups/{groupId}/requests":
112136
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1requests"
113-
"/groups/{groupId}/invites":
114-
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1invites"
115-
"/groups/{groupId}/invites/{userId}":
116-
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1invites~1{userId}"
137+
"/groups/{groupId}/requests/{userId}":
138+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1requests~1{userId}"
139+
"/groups/{groupId}/roles":
140+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1roles"
141+
"/groups/{groupId}/roles/{groupRoleId}":
142+
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1roles~1{groupRoleId}"
117143

118144
# invite
119145

openapi/components/paths/files.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ paths:
3030
name: userId
3131
deprecated: true
3232
description: 'UserID, will always generate a 500 permission error.'
33-
- $ref: '../parameters.yaml#/number'
34-
- $ref: '../parameters.yaml#/offset'
33+
- $ref: ../parameters.yaml#/number
34+
- $ref: ../parameters.yaml#/offset
3535
tags:
3636
- files
3737
/file:

0 commit comments

Comments
 (0)