Skip to content

Commit 8fe8ce6

Browse files
Add Avatar Style, Props, and Inventory endpoints (#473)
* Add Avatar Style, Props, and Inventory endpoints Known missing endpoints: - `PUT /inventory/{inventoryItemId}` - `PUT /inventory/{inventoryItemId}/consume` * Fix typos, add missing global tags * Wrap paths in quotes * oops * System.Char.ToUpper
1 parent 605ed33 commit 8fe8ce6

34 files changed

+764
-2
lines changed

openapi/components/parameters.yaml

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,14 +403,14 @@ contentId:
403403
required: false
404404
schema:
405405
type: boolean
406-
description: Filter for users' previously submitted feedback, e.g., a groupId, useeId, avatarId, etc.
406+
description: Filter for users' previously submitted feedback, e.g., a groupId, userId, avatarId, etc.
407407
active:
408408
name: active
409409
in: query
410410
required: false
411411
schema:
412412
type: boolean
413-
description: Filter for users' listings.
413+
description: Filter for users' listings and inventory bundles.
414414
variant:
415415
name: variant
416416
in: query
@@ -477,3 +477,59 @@ verifyLoginPlaceToken:
477477
schema:
478478
type: string
479479
description: 'Token to verify login attempt.'
480+
propId:
481+
name: propId
482+
in: path
483+
required: true
484+
schema:
485+
type: string
486+
example: 'prop_829ba6f6-b837-49d9-b9a9-056b82103b58'
487+
description: Prop ID.
488+
adminAssetBundleId:
489+
name: adminAssetBundleId
490+
in: path
491+
required: true
492+
schema:
493+
type: string
494+
example: 'aab_e159e72c-ce54-4fbe-8c37-96af02f6d18d'
495+
description: Must be a valid admin asset bundle ID.
496+
inventoryItemId:
497+
name: inventoryItemId
498+
in: path
499+
required: true
500+
schema:
501+
type: string
502+
example: inv_00000000-0000-0000-0000-000000000000
503+
description: Must be a valid inventory item ID.
504+
inventoryTemplateId:
505+
name: inventoryTemplateId
506+
in: path
507+
required: true
508+
schema:
509+
type: string
510+
example: invt_00000000-0000-0000-0000-000000000000
511+
description: Must be a valid inventory template ID.
512+
inventorySortOrder:
513+
name: inventorySortOrder
514+
in: query
515+
required: false
516+
schema:
517+
type: string
518+
enum:
519+
- newest
520+
- oldest
521+
description: Sort order for inventory retrieval.
522+
inventoryItemType:
523+
name: inventoryItemType
524+
in: query
525+
required: false
526+
schema:
527+
$ref: ./schemas/InventoryItemType.yaml
528+
description: Filter for inventory retrieval.
529+
inventorySpawnItemId:
530+
name: id
531+
in: query
532+
required: true
533+
schema:
534+
$ref: ./schemas/InventoryItemID.yaml
535+
description: Id for inventory item spawning.

openapi/components/paths.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
$ref: "./paths/avatars.yaml#/paths/~1users~1{userId}~1avatar"
4444
"/avatars":
4545
$ref: "./paths/avatars.yaml#/paths/~1avatars"
46+
"/avatarStyles":
47+
$ref: "./paths/avatars.yaml#/paths/~1avatarStyles"
4648
"/avatars/{avatarId}":
4749
$ref: "./paths/avatars.yaml#/paths/~1avatars~1{avatarId}"
4850
"/avatars/{avatarId}/select":
@@ -130,6 +132,8 @@
130132
$ref: "./paths/files.yaml#/paths/~1icon"
131133
"/gallery":
132134
$ref: "./paths/files.yaml#/paths/~1gallery"
135+
"/adminassetbundles/{adminAssetBundleId}":
136+
$ref: "./paths/files.yaml#/paths/~1adminassetbundles~1{adminAssetBundleId}"
133137

134138
# friends
135139

@@ -199,6 +203,19 @@
199203
"/groups/{groupId}/roles/{groupRoleId}":
200204
$ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1roles~1{groupRoleId}"
201205

206+
# inventory
207+
208+
"/inventory":
209+
$ref: "./paths/inventory.yaml#/paths/~1inventory"
210+
"/inventory/{inventoryItemId}":
211+
$ref: "./paths/inventory.yaml#/paths/~1inventory~1{inventoryItemId}"
212+
"/inventory/drops":
213+
$ref: "./paths/inventory.yaml#/paths/~1inventory~1drops"
214+
"/inventory/template/{inventoryTemplateId}":
215+
$ref: "./paths/inventory.yaml#/paths/~1inventory~1template~1{inventoryTemplateId}"
216+
"/inventory/spawn":
217+
$ref: "./paths/inventory.yaml#/paths/~1inventory~1spawn"
218+
202219
# invite
203220

204221
"/invite/{userId}":
@@ -262,6 +279,11 @@
262279
"/prints":
263280
$ref: "./paths/prints.yaml#/paths/~1prints"
264281

282+
# props
283+
284+
"/props/{propId}":
285+
$ref: "./paths/props.yaml#/paths/~1props~1{propId}"
286+
265287
# jams
266288

267289
"/jams":

openapi/components/paths/avatars.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,16 @@ paths:
124124
schema:
125125
$ref: ../requests/CreateAvatarRequest.yaml
126126
description: Create an avatar. It's possible to optionally specify a ID if you want a custom one. Attempting to create an Avatar with an already claimed ID will result in a DB error.
127+
/avatarStyles:
128+
get:
129+
summary: Get Avatar Styles
130+
tags:
131+
- avatars
132+
responses:
133+
'200':
134+
$ref: ../responses/avatars/AvatarStyleListResponse.yaml
135+
operationId: getAvatarStyles
136+
description: List avatar styles.
127137
'/avatars/{avatarId}':
128138
parameters:
129139
- $ref: ../parameters.yaml#/avatarId

openapi/components/paths/files.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,20 @@ paths:
358358
security:
359359
- authCookie: [ ]
360360
description: Upload a gallery image
361+
/adminassetbundles/{adminAssetBundleId}:
362+
get:
363+
summary: Get AdminAssetBundle
364+
responses:
365+
'200':
366+
$ref: ../responses/files/AdminAssetBundleResponse.yaml
367+
operationId: getAdminAssetBundle
368+
security:
369+
- authCookie: []
370+
description: Returns an AdminAssetBundle
371+
parameters:
372+
- $ref: ../parameters.yaml#/adminAssetBundleId
373+
tags:
374+
- files
361375
tags:
362376
$ref: ../tags.yaml
363377
components:
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
openapi: 3.0.3
2+
info:
3+
title: inventory
4+
version: '1.0'
5+
description: 'The inventory manages collectable items, such as drop bundles and their contents.'
6+
paths:
7+
'/inventory':
8+
parameters:
9+
- $ref: ../parameters.yaml#/number
10+
- $ref: ../parameters.yaml#/offset
11+
- $ref: ../parameters.yaml#/inventorySortOrder
12+
- $ref: ../parameters.yaml#/inventoryItemType
13+
get:
14+
summary: Get Inventory
15+
operationId: getInventory
16+
security:
17+
- authCookie: []
18+
responses:
19+
'200':
20+
$ref: ../responses/inventory/InventoryResponse.yaml
21+
'401':
22+
$ref: ../responses/MissingCredentialsError.yaml
23+
tags:
24+
- inventory
25+
description: Returns an Inventory object.
26+
'/inventory/{inventoryItemId}':
27+
parameters:
28+
- $ref: ../parameters.yaml#/inventoryItemId
29+
get:
30+
summary: Get Own Inventory Item
31+
operationId: getOwnInventoryItem
32+
security:
33+
- authCookie: []
34+
responses:
35+
'200':
36+
$ref: ../responses/inventory/InventoryItemResponse.yaml
37+
'401':
38+
$ref: ../responses/MissingCredentialsError.yaml
39+
tags:
40+
- inventory
41+
description: Returns an InventoryItem object held by the currently logged in user.
42+
'/users/{userId}/inventory/{inventoryItemId}':
43+
parameters:
44+
- $ref: ../parameters.yaml#/userId
45+
- $ref: ../parameters.yaml#/inventoryItemId
46+
get:
47+
summary: Get User Inventory Item
48+
operationId: getUserInventoryItem
49+
security:
50+
- authCookie: []
51+
responses:
52+
'200':
53+
$ref: ../responses/inventory/InventoryItemResponse.yaml
54+
'401':
55+
$ref: ../responses/MissingCredentialsError.yaml
56+
tags:
57+
- inventory
58+
description: Returns an InventoryItem object held by the given user.
59+
'/inventory/drops':
60+
parameters:
61+
- $ref: ../parameters.yaml#/active
62+
get:
63+
summary: List Inventory Drops
64+
operationId: getInventoryDrops
65+
security:
66+
- authCookie: []
67+
responses:
68+
'200':
69+
$ref: ../responses/inventory/InventoryDropListResponse.yaml
70+
'401':
71+
$ref: ../responses/MissingCredentialsError.yaml
72+
tags:
73+
- inventory
74+
description: Returns a list of InventoryDrop objects.
75+
'/inventory/template/{inventoryTemplateId}':
76+
parameters:
77+
- $ref: ../parameters.yaml#/inventoryTemplateId
78+
get:
79+
summary: Get Inventory Template
80+
operationId: getInventoryTemplate
81+
security:
82+
- authCookie: []
83+
responses:
84+
'200':
85+
$ref: ../responses/inventory/InventoryTemplateResponse.yaml
86+
'401':
87+
$ref: ../responses/MissingCredentialsError.yaml
88+
tags:
89+
- inventory
90+
description: Returns an InventoryTemplate object.
91+
'/inventory/spawn':
92+
parameters:
93+
- $ref: ../parameters.yaml#/inventorySpawnItemId
94+
get:
95+
summary: Spawn Inventory Item
96+
operationId: spawnInventoryItem
97+
security:
98+
- authCookie: []
99+
responses:
100+
'200':
101+
$ref: ../responses/inventory/InventorySpawnResponse.yaml
102+
'401':
103+
$ref: ../responses/MissingCredentialsError.yaml
104+
tags:
105+
- inventory
106+
description: Returns an InventorySpawn object.
107+
tags:
108+
$ref: ../tags.yaml
109+
components:
110+
securitySchemes:
111+
$ref: ../securitySchemes.yaml
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
openapi: 3.0.3
2+
info:
3+
title: props
4+
version: '1.0'
5+
description: 'Props are interactable items users can spawn into instances.'
6+
paths:
7+
'/props/{propId}':
8+
parameters:
9+
- $ref: ../parameters.yaml#/propId
10+
get:
11+
summary: Get Prop
12+
operationId: getProp
13+
security:
14+
- authCookie: []
15+
responses:
16+
'200':
17+
$ref: ../responses/props/PropResponse.yaml
18+
'401':
19+
$ref: ../responses/MissingCredentialsError.yaml
20+
tags:
21+
- props
22+
description: Returns a Prop object.
23+
tags:
24+
$ref: ../tags.yaml
25+
components:
26+
securitySchemes:
27+
$ref: ../securitySchemes.yaml
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
description: Returns a list of AvatarStyle objects.
2+
content:
3+
application/json:
4+
schema:
5+
type: array
6+
items:
7+
$ref: ../../schemas/AvatarStyle.yaml
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
description: Returns a single AdminAssetBundle object.
2+
content:
3+
application/json:
4+
schema:
5+
$ref: ../../schemas/AdminAssetBundle.yaml
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
description: Returns a list of InventoryDrop objects.
2+
content:
3+
application/json:
4+
schema:
5+
type: array
6+
items:
7+
$ref: ../../schemas/InventoryDrop.yaml
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
description: Returns an InventoryItem object.
2+
content:
3+
application/json:
4+
schema:
5+
$ref: ../../schemas/InventoryItem.yaml

0 commit comments

Comments
 (0)