Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
223 changes: 223 additions & 0 deletions openapi/components/parameters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
number:
name: 'n'
in: query
required: false
schema:
type: integer
maximum: 100
minimum: 1
default: 60
description: The number of objects to return.
offset:
name: offset
in: query
required: false
schema:
type: integer
minimum: 0
description: A zero-based offset from the default object sorting from where search results start.
sortOptions:
name: sort
in: query
required: false
schema:
title: SortOptions
type: string
default: popularity
enum:
- popularity
- heat
- trust
- shuffle
- random
- favorites
- reportScore
- reportCount
- publicationDate
- labsPublicationDate
- created
- _created_at
- updated
- _updated_at
- order
- relevance
- magic
- name
example: popularity
description: How to sort
orderOptions:
name: order
in: query
required: false
schema:
title: OrderOptions
type: string
default: descending
enum:
- ascending
- descending
example: descending
description: Result ordering
releaseStatus:
name: releaseStatus
in: query
required: false
schema:
type: string
default: hidden
enum:
- public
- private
- hidden
example: hidden
description: Filter by ReleaseStatus.
offline:
name: offline
in: query
required: false
schema:
type: boolean
description: 'Returns *only* offline users if true, returns only online and active users if false'
fileId:
name: fileId
in: path
required: true
schema:
type: string
example: file_00000000-0000-0000-0000-000000000000
pattern: 'file_[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}'
versionId:
name: versionId
in: path
required: true
schema:
type: integer
minimum: 1
example: 1
fileType:
name: fileType
in: path
required: true
schema:
type: string
enum:
- file
- signature
- delta
example: file
userId:
name: userId
in: path
required: true
schema:
type: string
maxUnityVersion:
name: maxUnityVersion
in: query
required: false
schema:
type: string
description: The maximum Unity version supported by the asset.
minUnityVersion:
name: minUnityVersion
in: query
required: false
schema:
type: string
description: The minimum Unity version supported by the asset.
platform:
name: platform
in: query
required: false
schema:
type: string
description: The platform the asset supports.
tag:
name: tag
in: query
required: false
schema:
type: string
description: Tags to include (comma-separated).
notag:
name: notag
in: query
required: false
schema:
type: string
description: Tags to exclude (comma-separated).
search:
name: search
in: query
required: false
schema:
type: string
description: Filters by world name.
userIdQuery:
name: userId
in: query
required: false
schema:
type: string
description: Filter by author UserID
featured:
name: featured
in: query
required: false
schema:
type: string
description: Filters on featured results.
userIdAdmin:
name: userId
in: query
required: false
schema:
type: string
description: 'Target user to see information on, admin-only.'
worldId:
name: worldId
in: path
required: true
schema:
type: string
instanceId:
name: instanceId
in: path
required: true
schema:
type: string
favoriteId:
name: favoriteId
in: path
required: true
schema:
type: string
favoriteGroupType:
name: favoriteGroupType
in: path
required: true
schema:
type: string
enum:
- world
- friend
- avatar
description: 'The type of group to fetch, must be a valid FavoriteType.'
favoriteGroupName:
name: favoriteGroupName
in: path
required: true
schema:
type: string
avatarId:
name: avatarId
in: path
required: true
schema:
type: string
messageId:
name: messageId
in: path
required: true
schema:
type: integer
6 changes: 5 additions & 1 deletion openapi/components/paths.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,8 @@
/permissions:
$ref: ./paths/permissions.yaml#/paths/~1permissions
'/permissions/{permissionId}':
$ref: './paths/permissions.yaml#/paths/~1permissions~1{permissionId}'
$ref: './paths/permissions.yaml#/paths/~1permissions~1{permissionId}'
'/message/{userId}/message':
$ref: './paths/invite.yaml#/paths/~1message~1{userId}~1message'
'/message/{userId}/message/{messageId}':
$ref: './paths/invite.yaml#/paths/~1message~1{userId}~1message~1{messageId}'
8 changes: 5 additions & 3 deletions openapi/components/paths/authentication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ paths:
- authCookie: []
'/user/{userId}/delete':
parameters:
- $ref: '../../openapi.yaml#/components/parameters/userId'
- $ref: '../parameters.yaml#/userId'
put:
summary: Delete User
operationId: deleteUser
Expand All @@ -219,7 +219,9 @@ paths:
- apiKeyCookie: []
authCookie: []
tags:
$ref: ../../openapi.yaml#/tags
$ref: ../tags.yaml
components:
parameters:
$ref: ../parameters.yaml
securitySchemes:
$ref: ../../openapi.yaml#/components/securitySchemes
$ref: ../securitySchemes.yaml
58 changes: 29 additions & 29 deletions openapi/components/paths/avatars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ paths:
- apiKeyCookie: []
authCookie: []
parameters:
- $ref: ../../openapi.yaml#/components/parameters/featured
- $ref: ../../openapi.yaml#/components/parameters/sortOptions
- $ref: ../../openapi.yaml#/components/parameters/number
- $ref: ../../openapi.yaml#/components/parameters/orderOptions
- $ref: ../../openapi.yaml#/components/parameters/offset
- $ref: ../../openapi.yaml#/components/parameters/search
- $ref: ../../openapi.yaml#/components/parameters/tag
- $ref: ../../openapi.yaml#/components/parameters/notag
- $ref: ../../openapi.yaml#/components/parameters/releaseStatus
- $ref: ../../openapi.yaml#/components/parameters/maxUnityVersion
- $ref: ../../openapi.yaml#/components/parameters/minUnityVersion
- $ref: ../../openapi.yaml#/components/parameters/platform
- $ref: ../../openapi.yaml#/components/parameters/userIdAdmin
- $ref: ../parameters.yaml#/featured
- $ref: ../parameters.yaml#/sortOptions
- $ref: ../parameters.yaml#/number
- $ref: ../parameters.yaml#/orderOptions
- $ref: ../parameters.yaml#/offset
- $ref: ../parameters.yaml#/search
- $ref: ../parameters.yaml#/tag
- $ref: ../parameters.yaml#/notag
- $ref: ../parameters.yaml#/releaseStatus
- $ref: ../parameters.yaml#/maxUnityVersion
- $ref: ../parameters.yaml#/minUnityVersion
- $ref: ../parameters.yaml#/platform
- $ref: ../parameters.yaml#/userIdAdmin
description: Search and list favorited avatars by query filters.
/avatars:
get:
Expand All @@ -50,8 +50,8 @@ paths:
- apiKeyCookie: []
authCookie: []
parameters:
- $ref: ../../openapi.yaml#/components/parameters/featured
- $ref: ../../openapi.yaml#/components/parameters/sortOptions
- $ref: ../parameters.yaml#/featured
- $ref: ../parameters.yaml#/sortOptions
- schema:
type: string
enum:
Expand All @@ -60,16 +60,16 @@ paths:
required: false
name: user
description: Set to `me` for searching own avatars.
- $ref: ../../openapi.yaml#/components/parameters/userIdQuery
- $ref: ../../openapi.yaml#/components/parameters/number
- $ref: ../../openapi.yaml#/components/parameters/orderOptions
- $ref: ../../openapi.yaml#/components/parameters/offset
- $ref: ../../openapi.yaml#/components/parameters/tag
- $ref: ../../openapi.yaml#/components/parameters/notag
- $ref: ../../openapi.yaml#/components/parameters/releaseStatus
- $ref: ../../openapi.yaml#/components/parameters/maxUnityVersion
- $ref: ../../openapi.yaml#/components/parameters/minUnityVersion
- $ref: ../../openapi.yaml#/components/parameters/platform
- $ref: ../parameters.yaml#/userIdQuery
- $ref: ../parameters.yaml#/number
- $ref: ../parameters.yaml#/orderOptions
- $ref: ../parameters.yaml#/offset
- $ref: ../parameters.yaml#/tag
- $ref: ../parameters.yaml#/notag
- $ref: ../parameters.yaml#/releaseStatus
- $ref: ../parameters.yaml#/maxUnityVersion
- $ref: ../parameters.yaml#/minUnityVersion
- $ref: ../parameters.yaml#/platform
description: Search and list avatars by query filters. You can only search your own or featured avatars. It is not possible as a normal user to search other peoples avatars.
post:
summary: Create Avatar
Expand Down Expand Up @@ -126,7 +126,7 @@ paths:
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.
'/avatars/{avatarId}':
parameters:
- $ref: ../../openapi.yaml#/components/parameters/avatarId
- $ref: ../parameters.yaml#/avatarId
get:
summary: Get Avatar
tags:
Expand Down Expand Up @@ -213,7 +213,7 @@ paths:
description: 'Delete an avatar. Notice an avatar is never fully "deleted", only its ReleaseStatus is set to "hidden" and the linked Files are deleted. The AvatarID is permanently reserved.'
'/avatars/{avatarId}/select':
parameters:
- $ref: ../../openapi.yaml#/components/parameters/avatarId
- $ref: ../parameters.yaml#/avatarId
put:
summary: Select Avatar
tags:
Expand All @@ -231,7 +231,7 @@ paths:
authCookie: []
description: Switches into that avatar.
tags:
$ref: ../../openapi.yaml#/tags
$ref: ../tags.yaml
components:
securitySchemes:
$ref: ../../openapi.yaml#/components/securitySchemes
$ref: ../securitySchemes.yaml
Loading