From a69a0a982007a8da431302e7df9a8ffde5f6920d Mon Sep 17 00:00:00 2001 From: foorack Date: Fri, 23 Jul 2021 21:38:45 +0200 Subject: [PATCH 01/15] Fixed created_at at updated_at in LimitedWorld --- openapi/components/schemas/LimitedWorld.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi/components/schemas/LimitedWorld.yaml b/openapi/components/schemas/LimitedWorld.yaml index e4462887..5444d728 100644 --- a/openapi/components/schemas/LimitedWorld.yaml +++ b/openapi/components/schemas/LimitedWorld.yaml @@ -56,7 +56,7 @@ required: - authorId - authorName - capacity - - createdAt + - created_at - favorites - heat - id @@ -69,4 +69,4 @@ required: - tags - thumbnailImageUrl - unityPackages - - updatedAt + - updated_at From 3a531cf127b37f82e17e0379b852d94ad2356806 Mon Sep 17 00:00:00 2001 From: foorack Date: Fri, 23 Jul 2021 21:39:19 +0200 Subject: [PATCH 02/15] Work on /worlds --- openapi.yaml | 219 +++++++++++++++++++++++++++------------------------ 1 file changed, 115 insertions(+), 104 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index cdf0885c..5ae624b7 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -413,104 +413,6 @@ paths: **Has been locked down and now always respond with "Invalid Admin Credentials".** deprecated: true - /worlds: - get: - summary: Search all worlds - tags: - - worlds - responses: - '200': - description: OK - content: - application/json: - schema: - type: array - items: - $ref: ./openapi/components/schemas/LimitedWorld.yaml - '401': - $ref: '#/components/responses/MissingCredentials' - operationId: searchWorlds - security: - - apiKeyCookie: [] - authCookie: [] - parameters: - - schema: - type: boolean - in: query - required: false - name: featured - description: is the world featured - - $ref: '#/components/parameters/sortOptions' - - schema: - type: string - in: query - required: false - name: user - description: Set to `me` for searching own worlds - - schema: - type: string - in: query - required: false - name: userId - description: Filter by creator id, use `me` for only worlds owned by current user - - $ref: '#/components/parameters/number' - - $ref: '#/components/parameters/orderOptions' - - $ref: '#/components/parameters/offset' - - schema: - type: string - minLength: 0 - in: query - required: false - name: search - description: Searches by `name`. Will return empty array if search query is empty or missing. - - schema: - type: array - items: - type: string - in: query - required: false - name: tag - description: Filter by Tag - - schema: - type: array - items: - type: string - in: query - required: false - name: notag - description: Tags to exclude - - $ref: '#/components/parameters/releaseStatus' - - schema: - type: string - in: query - required: false - name: maxUnityVersion - description: Current unity version the game is using - - schema: - type: string - in: query - required: false - name: minUnityVersion - description: The min unity version the world support - - schema: - type: string - in: query - required: false - name: maxAssetVersion - description: Current asset version the game is using - - schema: - type: string - in: query - required: false - name: minAssetVersion - description: The min asset version the world support - - schema: - type: string - in: query - required: false - name: platform - description: The platform the world supports (usually standalonewindows) - description: Search and list any worlds by text query /health: get: summary: Check API Health @@ -1101,6 +1003,104 @@ paths: - apiKeyCookie: [] authCookie: [] description: Finish an upload of a FileData. This will mark it as "complete". After uploading the `file` for Avatars and Worlds you then have to upload a `signature` file. + /worlds: + get: + summary: Search All Worlds + tags: + - worlds + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: ./openapi/components/schemas/LimitedWorld.yaml + '401': + $ref: '#/components/responses/MissingCredentials' + operationId: searchWorlds + security: + - apiKeyCookie: [] + authCookie: [] + parameters: + - schema: + type: boolean + in: query + required: false + name: featured + description: If the world is featured + - $ref: '#/components/parameters/sortOptions' + - schema: + type: string + in: query + required: false + name: user + description: Set to `me` for searching own worlds + - schema: + type: string + in: query + required: false + name: userId + description: 'Filter by creator id, use `me` for only worlds owned by current user' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/orderOptions' + - $ref: '#/components/parameters/offset' + - schema: + type: string + minLength: 0 + in: query + required: false + name: search + description: Searches by `name`. Will return empty array if search query is empty or missing. + - schema: + type: array + items: + type: string + in: query + required: false + name: tag + description: Filter by Tag + - schema: + type: array + items: + type: string + in: query + required: false + name: notag + description: Tags to exclude + - $ref: '#/components/parameters/releaseStatus' + - schema: + type: string + in: query + required: false + name: maxUnityVersion + description: Current unity version the game is using + - schema: + type: string + in: query + required: false + name: minUnityVersion + description: The min unity version the world support + - schema: + type: string + in: query + required: false + name: maxAssetVersion + description: Current asset version the game is using + - schema: + type: string + in: query + required: false + name: minAssetVersion + description: The min asset version the world support + - schema: + type: string + in: query + required: false + name: platform + description: The platform the world supports (usually standalonewindows) + description: Search and list any worlds by text query. components: schemas: {} securitySchemes: @@ -1538,15 +1538,27 @@ components: schema: title: SortOptions type: string - default: order + default: popularity enum: - popularity + - heat + - trust + - shuffle + - random + - favorites + - reportScore + - reportCount + - publicationDate + - labsPublicationDate - created - - updated - - order - _created_at + - updated - _updated_at - example: order + - order + - relevance + - magic + - name + example: popularity description: How to sort orderOptions: name: order @@ -1561,12 +1573,11 @@ components: - descending example: descending description: Result ordering - # Tried to make this a reference to ./openapi/components/schemas/ReleaseStatus.yaml and the generator was not happy releaseStatus: name: releaseStatus in: query required: false - schema: + schema: type: string default: hidden enum: From 0a721dd1735bca714a8479e95c30ea8523f70489 Mon Sep 17 00:00:00 2001 From: foorack Date: Fri, 23 Jul 2021 22:01:16 +0200 Subject: [PATCH 03/15] Minor lint fixes --- openapi.yaml | 67 +++++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 38 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 5ae624b7..a1f02082 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -211,11 +211,7 @@ paths: - authCookie: [] '/user/{userId}/delete': parameters: - - schema: - type: string - name: userId - in: path - required: true + - $ref: '#/components/parameters/userId' put: summary: Delete User operationId: deleteUserById @@ -302,11 +298,7 @@ paths: description: Get public user information about a specific user using their name. '/users/{userId}': parameters: - - schema: - type: string - name: userId - in: path - required: true + - $ref: '#/components/parameters/userId' get: summary: Get User by ID tags: @@ -515,11 +507,7 @@ paths: description: List information about friends. '/user/{userId}/friendStatus': parameters: - - schema: - type: string - name: userId - in: path - required: true + - $ref: '#/components/parameters/userId' get: summary: Check Friend Status tags: @@ -536,11 +524,7 @@ paths: description: 'Retrieve if the user is currently a friend with a given user, if they have an outgoing friend request, and if they have an incoming friend request. The proper way to receive and accept friend request is by checking if the user has an incoming `Notification` of type `friendRequest`, and then accepting that notification.' '/user/{userId}/friendRequest': parameters: - - schema: - type: string - name: userId - in: path - required: true + - $ref: '#/components/parameters/userId' post: summary: Send Friend Request tags: @@ -575,11 +559,7 @@ paths: $ref: '#/components/responses/DeleteFriendRequestError' '/auth/user/friends/{userId}': parameters: - - schema: - type: string - name: userId - in: path - required: true + - $ref: '#/components/parameters/userId' delete: summary: Unfriend operationId: unfriend @@ -1010,13 +990,7 @@ paths: - worlds responses: '200': - description: OK - content: - application/json: - schema: - type: array - items: - $ref: ./openapi/components/schemas/LimitedWorld.yaml + $ref: '#/components/responses/LimitedWorldList' '401': $ref: '#/components/responses/MissingCredentials' operationId: searchWorlds @@ -1026,23 +1000,26 @@ paths: parameters: - schema: type: boolean + default: false in: query required: false name: featured - description: If the world is featured + description: If the world is featured. - $ref: '#/components/parameters/sortOptions' - schema: type: string + enum: + - me in: query required: false name: user - description: Set to `me` for searching own worlds + description: Set to `me` for searching own worlds. - schema: type: string in: query required: false name: userId - description: 'Filter by creator id, use `me` for only worlds owned by current user' + description: 'Filter by creator id, use `me` for only worlds owned by current user.' - $ref: '#/components/parameters/number' - $ref: '#/components/parameters/orderOptions' - $ref: '#/components/parameters/offset' @@ -1052,7 +1029,7 @@ paths: in: query required: false name: search - description: Searches by `name`. Will return empty array if search query is empty or missing. + description: Searches by world name. - schema: type: array items: @@ -1060,7 +1037,7 @@ paths: in: query required: false name: tag - description: Filter by Tag + description: Tags to include. - schema: type: array items: @@ -1068,7 +1045,7 @@ paths: in: query required: false name: notag - description: Tags to exclude + description: Tags to exclude. - $ref: '#/components/parameters/releaseStatus' - schema: type: string @@ -1511,6 +1488,14 @@ components: maxParts: 1000 parts: [] etags: [] + LimitedWorldList: + description: Returns a list of LimitedWorld objects. + content: + application/json: + schema: + type: array + items: + $ref: ./openapi/components/schemas/LimitedWorld.yaml examples: {} parameters: number: @@ -1619,6 +1604,12 @@ components: - signature - delta example: file + userId: + name: userId + in: path + required: true + schema: + type: string tags: - name: authentication - name: users From eb4fca4414b678504d6ba435b05c263c5583fcc8 Mon Sep 17 00:00:00 2001 From: Foorack Date: Sat, 7 Aug 2021 03:44:55 +0200 Subject: [PATCH 04/15] Modified 3 files --- openapi.yaml | 47 +++-- openapi/components/schemas/LimitedWorld.yaml | 62 +++++- openapi/components/schemas/World.yaml | 197 +++++++++++++++++++ 3 files changed, 272 insertions(+), 34 deletions(-) create mode 100644 openapi/components/schemas/World.yaml diff --git a/openapi.yaml b/openapi.yaml index a1f02082..36014b0f 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1047,30 +1047,8 @@ paths: name: notag description: Tags to exclude. - $ref: '#/components/parameters/releaseStatus' - - schema: - type: string - in: query - required: false - name: maxUnityVersion - description: Current unity version the game is using - - schema: - type: string - in: query - required: false - name: minUnityVersion - description: The min unity version the world support - - schema: - type: string - in: query - required: false - name: maxAssetVersion - description: Current asset version the game is using - - schema: - type: string - in: query - required: false - name: minAssetVersion - description: The min asset version the world support + - $ref: '#/components/parameters/maxUnityVersion' + - $ref: '#/components/parameters/minUnityVersion' - schema: type: string in: query @@ -1570,6 +1548,7 @@ components: - private - hidden example: hidden + description: Filter by ReleaseStatus. offline: name: offline in: query @@ -1610,6 +1589,26 @@ components: 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 tags: - name: authentication - name: users diff --git a/openapi/components/schemas/LimitedWorld.yaml b/openapi/components/schemas/LimitedWorld.yaml index 5444d728..c3e54280 100644 --- a/openapi/components/schemas/LimitedWorld.yaml +++ b/openapi/components/schemas/LimitedWorld.yaml @@ -1,41 +1,68 @@ -title: LimitedWorld +description: '' type: object +title: LimitedWorld properties: authorId: $ref: ./UserID.yaml authorName: type: string + minLength: 1 + readOnly: true capacity: type: number + minimum: 0 + example: 8 + readOnly: true created_at: type: string - format: date + minLength: 1 + format: date-time + readOnly: true favorites: type: number + default: 0 + example: 12024 + minimum: 0 + readOnly: true heat: type: number + example: 5 + minimum: 0 + default: 0 + readOnly: true id: $ref: ./WorldID.yaml imageUrl: type: string + minLength: 1 labsPublicationDate: type: string - # This is a date string unless there is no date, then it's 'none' - # oneOf: date, string did not generate - # format: date + minLength: 1 + example: none name: type: string + minLength: 1 occupants: type: number + minimum: 0 + example: 47 + default: 0 + readOnly: true organization: type: string + minLength: 1 + default: vrchat + example: vrchat popularity: type: number + example: 8 + minimum: 0 + default: 0 + readOnly: true publicationDate: type: string - # This is a date string unless there is no date, then it's 'none' - # oneOf: date, string did not generate - # format: date + minLength: 1 + format: date-time releaseStatus: $ref: ./ReleaseStatus.yaml tags: @@ -44,14 +71,27 @@ properties: $ref: ./Tag.yaml thumbnailImageUrl: type: string - # TODO + minLength: 1 unityPackages: type: array + uniqueItems: true + minItems: 1 items: type: object + properties: + platform: + type: string + minLength: 1 + unityVersion: + type: string + minLength: 1 + required: + - platform + - unityVersion updated_at: type: string - format: date + minLength: 1 + format: date-time required: - authorId - authorName @@ -61,7 +101,9 @@ required: - heat - id - imageUrl + - labsPublicationDate - name + - occupants - organization - popularity - publicationDate diff --git a/openapi/components/schemas/World.yaml b/openapi/components/schemas/World.yaml new file mode 100644 index 00000000..66d25f35 --- /dev/null +++ b/openapi/components/schemas/World.yaml @@ -0,0 +1,197 @@ +description: '' +type: object +title: World +properties: + assetUrl: + type: string + minLength: 1 + assetUrlObject: + type: object + authorId: + $ref: ./UserID.yaml + authorName: + type: string + minLength: 1 + readOnly: true + capacity: + type: number + minimum: 0 + example: 8 + readOnly: true + created_at: + type: string + minLength: 1 + format: date-time + readOnly: true + description: + type: string + minLength: 0 + favorites: + type: number + minimum: 0 + default: 0 + example: 12024 + readOnly: true + featured: + type: boolean + default: false + heat: + type: number + minimum: 0 + example: 5 + default: 0 + readOnly: true + id: + $ref: ./WorldID.yaml + imageUrl: + type: string + minLength: 1 + instances: + type: array + items: + type: object + labsPublicationDate: + type: string + minLength: 1 + example: none + name: + type: string + minLength: 1 + namespace: + type: string + occupants: + type: number + minimum: 0 + example: 47 + default: 0 + readOnly: true + organization: + type: string + minLength: 1 + example: vrchat + default: vrchat + pluginUrlObject: + type: object + popularity: + type: number + example: 8 + default: 0 + minimum: 0 + readOnly: true + previewYoutubeId: + type: string + privateOccupants: + type: number + default: 0 + minimum: 0 + example: 1 + readOnly: true + publicOccupants: + type: number + example: 46 + default: 0 + minimum: 0 + readOnly: true + publicationDate: + type: string + minLength: 1 + format: date-time + releaseStatus: + $ref: ./ReleaseStatus.yaml + tags: + type: array + items: + $ref: ./Tag.yaml + thumbnailImageUrl: + type: string + minLength: 1 + unityPackageUrlObject: + type: object + unityPackages: + type: array + uniqueItems: true + minItems: 1 + items: + type: object + properties: + id: + type: string + minLength: 1 + assetUrl: + type: string + minLength: 1 + assetUrlObject: + type: object + pluginUrl: + type: string + pluginUrlObject: + type: object + unityVersion: + type: string + minLength: 1 + unitySortNumber: + type: number + assetVersion: + type: number + platform: + type: string + minLength: 1 + created_at: + type: string + minLength: 1 + required: + - id + - assetUrl + - pluginUrl + - unityVersion + - unitySortNumber + - assetVersion + - platform + - created_at + updated_at: + type: string + minLength: 1 + format: date-time + version: + type: number + minimum: 0 + example: 68 + default: 0 + visits: + type: number + minimum: 0 + example: 9988675 + default: 0 + readOnly: true +required: + - assetUrl + - assetUrlObject + - authorId + - authorName + - capacity + - created_at + - description + - favorites + - featured + - heat + - id + - imageUrl + - instances + - labsPublicationDate + - name + - namespace + - occupants + - organization + - pluginUrlObject + - popularity + - privateOccupants + - publicOccupants + - publicationDate + - releaseStatus + - tags + - thumbnailImageUrl + - unityPackageUrlObject + - unityPackages + - updated_at + - version + - visits From af97989912001aea1561957e9e763f22e4b9f759 Mon Sep 17 00:00:00 2001 From: Foorack Date: Sat, 7 Aug 2021 03:53:47 +0200 Subject: [PATCH 05/15] Created UnityPackage/LimitedUnityPackage/UnityPackageID --- openapi/components/schemas/CurrentUser.yaml | 4 +- .../schemas/LimitedUnityPackage.yaml | 13 ++ openapi/components/schemas/LimitedUser.yaml | 2 +- openapi/components/schemas/LimitedWorld.yaml | 158 +++++++++--------- openapi/components/schemas/Platform.yaml | 5 + openapi/components/schemas/UnityPackage.yaml | 53 ++++++ .../components/schemas/UnityPackageID.yaml | 4 + openapi/components/schemas/User.yaml | 2 +- openapi/components/schemas/World.yaml | 37 +--- 9 files changed, 161 insertions(+), 117 deletions(-) create mode 100644 openapi/components/schemas/LimitedUnityPackage.yaml create mode 100644 openapi/components/schemas/Platform.yaml create mode 100644 openapi/components/schemas/UnityPackage.yaml create mode 100644 openapi/components/schemas/UnityPackageID.yaml diff --git a/openapi/components/schemas/CurrentUser.yaml b/openapi/components/schemas/CurrentUser.yaml index 30c411b9..f5384017 100644 --- a/openapi/components/schemas/CurrentUser.yaml +++ b/openapi/components/schemas/CurrentUser.yaml @@ -90,7 +90,7 @@ properties: type: string format: date-time last_platform: - type: string + $ref: ./Platform.yaml allowAvatarCopying: type: boolean status: @@ -142,8 +142,6 @@ required: - fallbackAvatar - currentAvatar - currentAvatarAssetUrl -# Note: This is technically required, but does not generate as nullable if marked as required -# - accountDeletionDate - acceptedTOSVersion - steamId - steamDetails diff --git a/openapi/components/schemas/LimitedUnityPackage.yaml b/openapi/components/schemas/LimitedUnityPackage.yaml new file mode 100644 index 00000000..adeb8942 --- /dev/null +++ b/openapi/components/schemas/LimitedUnityPackage.yaml @@ -0,0 +1,13 @@ +description: '' +type: object +title: LimitedUnityPackage +properties: + platform: + $ref: ./Platform.yaml + unityVersion: + type: string + minLength: 1 + example: 2018.4.14f1 +required: + - platform + - unityVersion diff --git a/openapi/components/schemas/LimitedUser.yaml b/openapi/components/schemas/LimitedUser.yaml index 041a884f..76aa824b 100644 --- a/openapi/components/schemas/LimitedUser.yaml +++ b/openapi/components/schemas/LimitedUser.yaml @@ -24,7 +24,7 @@ properties: developerType: $ref: ./DeveloperType.yaml last_platform: - type: string + $ref: ./Platform.yaml status: $ref: ./UserStatus.yaml isFriend: diff --git a/openapi/components/schemas/LimitedWorld.yaml b/openapi/components/schemas/LimitedWorld.yaml index c3e54280..05195d11 100644 --- a/openapi/components/schemas/LimitedWorld.yaml +++ b/openapi/components/schemas/LimitedWorld.yaml @@ -1,75 +1,89 @@ description: '' type: object -title: LimitedWorld +x-examples: + example-1: + id: wrld_ba913a96-fac4-4048-a062-9aa5db092812 + name: VRChat Hub + authorId: 8JoV9XEdpo + authorName: vrchat + capacity: 8 + imageUrl: 'https://api.vrchat.cloud/api/1/file/file_314b6fcf-5552-48f0-8362-3b9922bae707/13/file' + thumbnailImageUrl: 'https://api.vrchat.cloud/api/1/image/file_314b6fcf-5552-48f0-8362-3b9922bae707/13/256' + releaseStatus: public + organization: vrchat + tags: + - content_featured + - admin_hide_popular + - admin_hide_new + - system_approved + - admin_approved + favorites: 12018 + created_at: '2019-05-13T20:43:48.204Z' + updated_at: '2020-09-15T16:21:23.098Z' + publicationDate: '2020-09-15T16:21:37.626Z' + labsPublicationDate: none + unityPackages: + - platform: android + unityVersion: 2017.4.15f1 + - platform: standalonewindows + unityVersion: 2017.4.15f1 + - platform: android + unityVersion: 2017.4.28f1 + - platform: standalonewindows + unityVersion: 2017.4.28f1 + - platform: android + unityVersion: 2018.4.12f1 + - platform: standalonewindows + unityVersion: 2018.4.12f1 + - platform: android + unityVersion: 2018.4.14f1 + - platform: standalonewindows + unityVersion: 2018.4.14f1 + popularity: 8 + heat: 5 + occupants: 42 properties: + id: + $ref: ./WorldID.yaml + name: + type: string + minLength: 1 authorId: - $ref: ./UserID.yaml - authorName: type: string minLength: 1 - readOnly: true - capacity: - type: number - minimum: 0 - example: 8 - readOnly: true - created_at: + authorName: type: string minLength: 1 - format: date-time - readOnly: true - favorites: - type: number - default: 0 - example: 12024 - minimum: 0 - readOnly: true - heat: + capacity: type: number - example: 5 - minimum: 0 - default: 0 - readOnly: true - id: - $ref: ./WorldID.yaml imageUrl: type: string minLength: 1 - labsPublicationDate: + thumbnailImageUrl: type: string minLength: 1 - example: none - name: + releaseStatus: type: string minLength: 1 - occupants: - type: number - minimum: 0 - example: 47 - default: 0 - readOnly: true organization: type: string minLength: 1 - default: vrchat - example: vrchat - popularity: + tags: + type: array + items: + type: object + favorites: type: number - example: 8 - minimum: 0 - default: 0 - readOnly: true + created_at: + type: string + minLength: 1 + updated_at: + type: string + minLength: 1 publicationDate: type: string minLength: 1 - format: date-time - releaseStatus: - $ref: ./ReleaseStatus.yaml - tags: - type: array - items: - $ref: ./Tag.yaml - thumbnailImageUrl: + labsPublicationDate: type: string minLength: 1 unityPackages: @@ -77,38 +91,30 @@ properties: uniqueItems: true minItems: 1 items: - type: object - properties: - platform: - type: string - minLength: 1 - unityVersion: - type: string - minLength: 1 - required: - - platform - - unityVersion - updated_at: - type: string - minLength: 1 - format: date-time + $ref: ./LimitedUnityPackage.yaml + popularity: + type: number + heat: + type: number + occupants: + type: number required: + - id + - name - authorId - authorName - capacity - - created_at - - favorites - - heat - - id - imageUrl - - labsPublicationDate - - name - - occupants - - organization - - popularity - - publicationDate + - thumbnailImageUrl - releaseStatus + - organization - tags - - thumbnailImageUrl - - unityPackages + - favorites + - created_at - updated_at + - publicationDate + - labsPublicationDate + - unityPackages + - popularity + - heat + - occupants diff --git a/openapi/components/schemas/Platform.yaml b/openapi/components/schemas/Platform.yaml new file mode 100644 index 00000000..a09ea91b --- /dev/null +++ b/openapi/components/schemas/Platform.yaml @@ -0,0 +1,5 @@ +type: string +title: Platform +enum: + - standalonewindows + - android diff --git a/openapi/components/schemas/UnityPackage.yaml b/openapi/components/schemas/UnityPackage.yaml new file mode 100644 index 00000000..b728b0fb --- /dev/null +++ b/openapi/components/schemas/UnityPackage.yaml @@ -0,0 +1,53 @@ +description: '' +type: object +x-examples: + example-1: + id: unp_52b12c39-4163-457d-a4a9-630e7aff1bff + assetUrl: 'https://api.vrchat.cloud/api/1/file/file_cd0caa7b-69ba-4715-8dfe-7d667a9d2537/65/file' + assetUrlObject: {} + pluginUrl: '' + pluginUrlObject: {} + unityVersion: 2018.4.14f1 + unitySortNumber: 20180414000 + assetVersion: 4 + platform: standalonewindows + created_at: '2020-09-10T06:13:27.777Z' +title: UnityPackage +properties: + id: + $ref: ./UnityPackageID.yaml + assetUrl: + type: string + minLength: 1 + assetUrlObject: + type: object + pluginUrl: + type: string + pluginUrlObject: + type: object + unityVersion: + type: string + minLength: 1 + example: 2018.4.12f1 + unitySortNumber: + type: number + minimum: 0 + assetVersion: + type: number + platform: + $ref: ./Platform.yaml + created_at: + type: string + minLength: 1 + format: date-time +required: + - id + - assetUrl + - assetUrlObject + - pluginUrl + - pluginUrlObject + - unityVersion + - unitySortNumber + - assetVersion + - platform + - created_at diff --git a/openapi/components/schemas/UnityPackageID.yaml b/openapi/components/schemas/UnityPackageID.yaml new file mode 100644 index 00000000..7bb87d0d --- /dev/null +++ b/openapi/components/schemas/UnityPackageID.yaml @@ -0,0 +1,4 @@ +title: UnityPackageID +type: string +pattern: '(unp)_[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}' +example: unp_52b12c39-4163-457d-a4a9-630e7aff1bff diff --git a/openapi/components/schemas/User.yaml b/openapi/components/schemas/User.yaml index aac791aa..881d01ff 100644 --- a/openapi/components/schemas/User.yaml +++ b/openapi/components/schemas/User.yaml @@ -37,7 +37,7 @@ properties: type: string format: date-time last_platform: - type: string + $ref: ./Platform.yaml allowAvatarCopying: type: boolean status: diff --git a/openapi/components/schemas/World.yaml b/openapi/components/schemas/World.yaml index 66d25f35..eb849324 100644 --- a/openapi/components/schemas/World.yaml +++ b/openapi/components/schemas/World.yaml @@ -112,42 +112,7 @@ properties: uniqueItems: true minItems: 1 items: - type: object - properties: - id: - type: string - minLength: 1 - assetUrl: - type: string - minLength: 1 - assetUrlObject: - type: object - pluginUrl: - type: string - pluginUrlObject: - type: object - unityVersion: - type: string - minLength: 1 - unitySortNumber: - type: number - assetVersion: - type: number - platform: - type: string - minLength: 1 - created_at: - type: string - minLength: 1 - required: - - id - - assetUrl - - pluginUrl - - unityVersion - - unitySortNumber - - assetVersion - - platform - - created_at + $ref: ./UnityPackage.yaml updated_at: type: string minLength: 1 From 93827e5950578e931e96711b13def26a79a92d29 Mon Sep 17 00:00:00 2001 From: foorack Date: Sat, 7 Aug 2021 04:24:38 +0200 Subject: [PATCH 06/15] Modified openapi.yaml --- openapi.yaml | 69 ++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 36014b0f..ba1f1c18 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1014,47 +1014,17 @@ paths: required: false name: user description: Set to `me` for searching own worlds. - - schema: - type: string - in: query - required: false - name: userId - description: 'Filter by creator id, use `me` for only worlds owned by current user.' + - $ref: '#/components/parameters/userIdQuery' - $ref: '#/components/parameters/number' - $ref: '#/components/parameters/orderOptions' - $ref: '#/components/parameters/offset' - - schema: - type: string - minLength: 0 - in: query - required: false - name: search - description: Searches by world name. - - schema: - type: array - items: - type: string - in: query - required: false - name: tag - description: Tags to include. - - schema: - type: array - items: - type: string - in: query - required: false - name: notag - description: Tags to exclude. + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/tag' + - $ref: '#/components/parameters/notag' - $ref: '#/components/parameters/releaseStatus' - $ref: '#/components/parameters/maxUnityVersion' - $ref: '#/components/parameters/minUnityVersion' - - schema: - type: string - in: query - required: false - name: platform - description: The platform the world supports (usually standalonewindows) + - $ref: '#/components/parameters/platform' description: Search and list any worlds by text query. components: schemas: {} @@ -1609,6 +1579,35 @@ components: 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 tags: - name: authentication - name: users From 0b5ba5a01b4d9d46f59620d4711b2cea7763d4f3 Mon Sep 17 00:00:00 2001 From: foorack Date: Sat, 7 Aug 2021 14:53:50 +0200 Subject: [PATCH 07/15] fix: weird Unicode slashes in MIMEType... --- openapi/components/schemas/MIMEType.yaml | 29 ++++++++++++------------ 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/openapi/components/schemas/MIMEType.yaml b/openapi/components/schemas/MIMEType.yaml index 19a05f9d..e699b3a7 100644 --- a/openapi/components/schemas/MIMEType.yaml +++ b/openapi/components/schemas/MIMEType.yaml @@ -1,17 +1,18 @@ type: string title: MIMEType enum: - - 'image⁄jpeg' - - 'image⁄jpg' - - 'image⁄png' - - 'image⁄webp' - - 'image⁄gif' - - 'image⁄bmp' - - 'image⁄svg+xml' - - 'image⁄tiff' - - 'application⁄x-avatar' - - 'application⁄x-world' - - 'application⁄gzip' - - 'application/x-rsync-signature' - - 'application/x-rsync-delta' - - 'application/octet-stream' + - image/jpeg + - image/jpg + - image/png + - image/webp + - image/gif + - image/bmp + - image/svg+xml + - image/tiff + - application/x-avatar + - application/x-world + - application/gzip + - application/x-rsync-signature + - application/x-rsync-delta + - application/octet-stream +example: image/jpeg From 5cff0149654b7224ae066c7644eff1b5cf682891 Mon Sep 17 00:00:00 2001 From: foorack Date: Sat, 7 Aug 2021 19:07:45 +0200 Subject: [PATCH 08/15] Work on Worlds endpoints --- openapi.yaml | 277 +++++++++++++++++- .../CreateWorldNotAllowedYetError.yaml | 12 + .../responses/SeeOtherUserFavoritesError.yaml | 12 + .../responses/SeeOtherUserRecentsError.yaml | 12 + .../responses/WorldNotFoundError.yaml | 12 + openapi/components/schemas/World.yaml | 5 - 6 files changed, 316 insertions(+), 14 deletions(-) create mode 100644 openapi/components/responses/CreateWorldNotAllowedYetError.yaml create mode 100644 openapi/components/responses/SeeOtherUserFavoritesError.yaml create mode 100644 openapi/components/responses/SeeOtherUserRecentsError.yaml create mode 100644 openapi/components/responses/WorldNotFoundError.yaml diff --git a/openapi.yaml b/openapi.yaml index ba1f1c18..1e035175 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -998,13 +998,7 @@ paths: - apiKeyCookie: [] authCookie: [] parameters: - - schema: - type: boolean - default: false - in: query - required: false - name: featured - description: If the world is featured. + - $ref: '#/components/parameters/featured' - $ref: '#/components/parameters/sortOptions' - schema: type: string @@ -1025,7 +1019,246 @@ paths: - $ref: '#/components/parameters/maxUnityVersion' - $ref: '#/components/parameters/minUnityVersion' - $ref: '#/components/parameters/platform' - description: Search and list any worlds by text query. + description: Search and list any worlds by query filters. + post: + summary: Create World + operationId: createWorld + responses: + '200': + $ref: '#/components/responses/World' + '400': + $ref: ./openapi/components/responses/CreateWorldNotAllowedYetError.yaml + '401': + $ref: '#/components/responses/MissingCredentials' + requestBody: + content: + application/json: + schema: + type: object + properties: + assetUrl: + type: string + minLength: 1 + assetVersion: + type: string + minLength: 1 + authorId: + $ref: ./openapi/components/schemas/UserID.yaml + authorName: + type: string + minLength: 1 + capacity: + type: integer + minimum: 1 + maximum: 40 + default: 16 + example: 16 + description: + type: string + id: + $ref: ./openapi/components/schemas/WorldID.yaml + imageUrl: + type: string + minLength: 1 + name: + type: string + minLength: 1 + platform: + $ref: ./openapi/components/schemas/Platform.yaml + releaseStatus: + $ref: ./openapi/components/schemas/ReleaseStatus.yaml + tags: + type: array + items: + $ref: ./openapi/components/schemas/Tag.yaml + unityPackageUrl: + type: string + minLength: 1 + unityVersion: + type: string + minLength: 1 + default: 5.3.4p1 + example: 2018.4.20f1 + required: + - assetUrl + - imageUrl + - name + description: '' + description: 'Create a new world. This endpoint requires `assetUrl` to be a valid File object with `.vrcw` file extension, and `imageUrl` to be a valid File object with an image file extension.' + /worlds/active: + get: + summary: List Active Worlds + tags: + - worlds + responses: + '200': + $ref: '#/components/responses/LimitedWorldList' + '401': + $ref: '#/components/responses/MissingCredentials' + operationId: getActiveWorlds + security: + - apiKeyCookie: [] + authCookie: [] + parameters: + - $ref: '#/components/parameters/featured' + - $ref: '#/components/parameters/sortOptions' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/orderOptions' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/tag' + - $ref: '#/components/parameters/notag' + - $ref: '#/components/parameters/releaseStatus' + - $ref: '#/components/parameters/maxUnityVersion' + - $ref: '#/components/parameters/minUnityVersion' + - $ref: '#/components/parameters/platform' + description: Search and list currently Active worlds by query filters. + /worlds/recent: + get: + summary: List Recent Worlds + tags: + - worlds + responses: + '200': + $ref: '#/components/responses/LimitedWorldList' + '401': + $ref: '#/components/responses/MissingCredentials' + '403': + $ref: ./openapi/components/responses/SeeOtherUserRecentsError.yaml + operationId: getRecentWorlds + security: + - apiKeyCookie: [] + authCookie: [] + parameters: + - $ref: '#/components/parameters/featured' + - $ref: '#/components/parameters/sortOptions' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/orderOptions' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/tag' + - $ref: '#/components/parameters/notag' + - $ref: '#/components/parameters/releaseStatus' + - $ref: '#/components/parameters/maxUnityVersion' + - $ref: '#/components/parameters/minUnityVersion' + - $ref: '#/components/parameters/platform' + - $ref: '#/components/parameters/userIdAdmin' + description: Search and list recently visited worlds by query filters. + /worlds/favorites: + get: + summary: List Favorited Worlds + tags: + - worlds + responses: + '200': + $ref: '#/components/responses/LimitedWorldList' + '401': + $ref: '#/components/responses/MissingCredentials' + '403': + $ref: ./openapi/components/responses/SeeOtherUserFavoritesError.yaml + operationId: getFavoritedWorlds + security: + - apiKeyCookie: [] + authCookie: [] + parameters: + - $ref: '#/components/parameters/featured' + - $ref: '#/components/parameters/sortOptions' + - $ref: '#/components/parameters/number' + - $ref: '#/components/parameters/orderOptions' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/search' + - $ref: '#/components/parameters/tag' + - $ref: '#/components/parameters/notag' + - $ref: '#/components/parameters/releaseStatus' + - $ref: '#/components/parameters/maxUnityVersion' + - $ref: '#/components/parameters/minUnityVersion' + - $ref: '#/components/parameters/platform' + - $ref: '#/components/parameters/userIdAdmin' + description: Search and list favorited worlds by query filters. + '/worlds/{worldId}': + parameters: + - $ref: '#/components/parameters/worldId' + get: + summary: Get World by ID + tags: [] + operationId: getWorld + responses: + '200': + $ref: '#/components/responses/World' + '404': + $ref: ./openapi/components/responses/WorldNotFoundError.yaml + description: Get information about a specific World. + put: + summary: Update World + operationId: updateWorld + responses: + '200': + $ref: '#/components/responses/World' + '401': + $ref: '#/components/responses/MissingCredentials' + '404': + $ref: ./openapi/components/responses/WorldNotFoundError.yaml + requestBody: + content: + application/json: + schema: + type: object + properties: + assetUrl: + type: string + minLength: 1 + assetVersion: + type: string + minLength: 1 + authorId: + $ref: ./openapi/components/schemas/UserID.yaml + authorName: + type: string + minLength: 1 + capacity: + type: integer + minimum: 1 + maximum: 40 + default: 16 + example: 16 + description: + type: string + id: + $ref: ./openapi/components/schemas/WorldID.yaml + imageUrl: + type: string + minLength: 1 + name: + type: string + minLength: 1 + platform: + $ref: ./openapi/components/schemas/Platform.yaml + releaseStatus: + $ref: ./openapi/components/schemas/ReleaseStatus.yaml + tags: + type: array + items: + $ref: ./openapi/components/schemas/Tag.yaml + unityPackageUrl: + type: string + minLength: 1 + unityVersion: + type: string + minLength: 1 + default: 5.3.4p1 + example: 2018.4.20f1 + description: Update information about a specific World. + delete: + summary: Delete World + operationId: deleteWorld + responses: + '200': + description: OK + '401': + $ref: '#/components/responses/MissingCredentials' + '404': + $ref: ./openapi/components/responses/WorldNotFoundError.yaml + description: 'Delete a world. Notice a world is never fully "deleted", only its ReleaseStatus is set to "hidden" and the linked Files are deleted. The WorldID is permanently reserved.' components: schemas: {} securitySchemes: @@ -1444,6 +1677,12 @@ components: type: array items: $ref: ./openapi/components/schemas/LimitedWorld.yaml + World: + description: Returns a single World object. + content: + application/json: + schema: + $ref: ./openapi/components/schemas/World.yaml examples: {} parameters: number: @@ -1579,7 +1818,7 @@ components: required: false schema: type: string - description: The platform the asset supports + description: The platform the asset supports. tag: name: tag in: query @@ -1608,6 +1847,26 @@ components: 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 tags: - name: authentication - name: users diff --git a/openapi/components/responses/CreateWorldNotAllowedYetError.yaml b/openapi/components/responses/CreateWorldNotAllowedYetError.yaml new file mode 100644 index 00000000..317e588f --- /dev/null +++ b/openapi/components/responses/CreateWorldNotAllowedYetError.yaml @@ -0,0 +1,12 @@ +title: CreateWorldNotAllowedYetError +description: Error response when trying create a world without having the neccesary Trust rank yet. +content: + application/json: + schema: + $ref: ../schemas/Error.yaml + examples: + 400 Can't Create World Yet: + value: + error: + message: \"You can't create a world right now\" + status_code: 400 \ No newline at end of file diff --git a/openapi/components/responses/SeeOtherUserFavoritesError.yaml b/openapi/components/responses/SeeOtherUserFavoritesError.yaml new file mode 100644 index 00000000..b14add75 --- /dev/null +++ b/openapi/components/responses/SeeOtherUserFavoritesError.yaml @@ -0,0 +1,12 @@ +title: SeeOtherUserFavoritesError +description: Error response when trying to see favourites of another user without sufficient admin permissions. +content: + application/json: + schema: + $ref: ../schemas/Error.yaml + examples: + 404 Cant See Other Users Favorites: + value: + error: + message: 403 You can't see another user's favorites + status_code: 403 \ No newline at end of file diff --git a/openapi/components/responses/SeeOtherUserRecentsError.yaml b/openapi/components/responses/SeeOtherUserRecentsError.yaml new file mode 100644 index 00000000..b8f3e0e0 --- /dev/null +++ b/openapi/components/responses/SeeOtherUserRecentsError.yaml @@ -0,0 +1,12 @@ +title: SeeOtherUserRecentsError +description: Error response when trying to accept a see recently visited worlds of another user without sufficient admin permissions. +content: + application/json: + schema: + $ref: ../schemas/Error.yaml + examples: + 403 Only See Own Recents: + value: + error: + message: \"You can only see your own recent worlds!\" + status_code: 403 \ No newline at end of file diff --git a/openapi/components/responses/WorldNotFoundError.yaml b/openapi/components/responses/WorldNotFoundError.yaml new file mode 100644 index 00000000..621e7977 --- /dev/null +++ b/openapi/components/responses/WorldNotFoundError.yaml @@ -0,0 +1,12 @@ +title: WorldNotFoundError +description: Error response when trying to show information about a non-existent world. Sometimes returns with `model not found` instead of `World Date: Sat, 7 Aug 2021 19:18:26 +0200 Subject: [PATCH 09/15] Add world metadata --- openapi.yaml | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/openapi.yaml b/openapi.yaml index 1e035175..a5c43665 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1085,6 +1085,8 @@ paths: - name description: '' description: 'Create a new world. This endpoint requires `assetUrl` to be a valid File object with `.vrcw` file extension, and `imageUrl` to be a valid File object with an image file extension.' + tags: + - worlds /worlds/active: get: summary: List Active Worlds @@ -1180,7 +1182,8 @@ paths: - $ref: '#/components/parameters/worldId' get: summary: Get World by ID - tags: [] + tags: + - worlds operationId: getWorld responses: '200': @@ -1248,6 +1251,8 @@ paths: default: 5.3.4p1 example: 2018.4.20f1 description: Update information about a specific World. + tags: + - worlds delete: summary: Delete World operationId: deleteWorld @@ -1259,6 +1264,38 @@ paths: '404': $ref: ./openapi/components/responses/WorldNotFoundError.yaml description: 'Delete a world. Notice a world is never fully "deleted", only its ReleaseStatus is set to "hidden" and the linked Files are deleted. The WorldID is permanently reserved.' + tags: + - worlds + '/worlds/{worldId}/metadata': + parameters: + - $ref: '#/components/parameters/worldId' + get: + summary: Get World Metadata + tags: + - worlds + operationId: getWorldMetadata + deprecated: true + description: Returns a worlds custom metadata. This is currently believed to be unused. Metadata can be set with `updateWorld` and can be any arbitrary object. + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + id: + $ref: ./openapi/components/schemas/WorldID.yaml + metadata: + type: object + readOnly: true + required: + - id + - metadata + readOnly: true + '404': + $ref: ./openapi/components/responses/WorldNotFoundError.yaml components: schemas: {} securitySchemes: From d0a7ab703a5c501c9cf43356452723e3600f648e Mon Sep 17 00:00:00 2001 From: foorack Date: Sat, 7 Aug 2021 19:22:58 +0200 Subject: [PATCH 10/15] Remove x-examples tag --- openapi/components/schemas/LimitedWorld.yaml | 42 -------------------- 1 file changed, 42 deletions(-) diff --git a/openapi/components/schemas/LimitedWorld.yaml b/openapi/components/schemas/LimitedWorld.yaml index 05195d11..327f14c4 100644 --- a/openapi/components/schemas/LimitedWorld.yaml +++ b/openapi/components/schemas/LimitedWorld.yaml @@ -1,47 +1,5 @@ description: '' type: object -x-examples: - example-1: - id: wrld_ba913a96-fac4-4048-a062-9aa5db092812 - name: VRChat Hub - authorId: 8JoV9XEdpo - authorName: vrchat - capacity: 8 - imageUrl: 'https://api.vrchat.cloud/api/1/file/file_314b6fcf-5552-48f0-8362-3b9922bae707/13/file' - thumbnailImageUrl: 'https://api.vrchat.cloud/api/1/image/file_314b6fcf-5552-48f0-8362-3b9922bae707/13/256' - releaseStatus: public - organization: vrchat - tags: - - content_featured - - admin_hide_popular - - admin_hide_new - - system_approved - - admin_approved - favorites: 12018 - created_at: '2019-05-13T20:43:48.204Z' - updated_at: '2020-09-15T16:21:23.098Z' - publicationDate: '2020-09-15T16:21:37.626Z' - labsPublicationDate: none - unityPackages: - - platform: android - unityVersion: 2017.4.15f1 - - platform: standalonewindows - unityVersion: 2017.4.15f1 - - platform: android - unityVersion: 2017.4.28f1 - - platform: standalonewindows - unityVersion: 2017.4.28f1 - - platform: android - unityVersion: 2018.4.12f1 - - platform: standalonewindows - unityVersion: 2018.4.12f1 - - platform: android - unityVersion: 2018.4.14f1 - - platform: standalonewindows - unityVersion: 2018.4.14f1 - popularity: 8 - heat: 5 - occupants: 42 properties: id: $ref: ./WorldID.yaml From 2aa8924cd7e893330b8b40c825daa6019dcd864d Mon Sep 17 00:00:00 2001 From: foorack Date: Sat, 7 Aug 2021 19:28:40 +0200 Subject: [PATCH 11/15] ci: fix openapi linting for unexpected title --- openapi/components/responses/CreateWorldNotAllowedYetError.yaml | 1 - openapi/components/responses/SeeOtherUserFavoritesError.yaml | 1 - openapi/components/responses/SeeOtherUserRecentsError.yaml | 1 - openapi/components/responses/WorldNotFoundError.yaml | 1 - 4 files changed, 4 deletions(-) diff --git a/openapi/components/responses/CreateWorldNotAllowedYetError.yaml b/openapi/components/responses/CreateWorldNotAllowedYetError.yaml index 317e588f..91a69207 100644 --- a/openapi/components/responses/CreateWorldNotAllowedYetError.yaml +++ b/openapi/components/responses/CreateWorldNotAllowedYetError.yaml @@ -1,4 +1,3 @@ -title: CreateWorldNotAllowedYetError description: Error response when trying create a world without having the neccesary Trust rank yet. content: application/json: diff --git a/openapi/components/responses/SeeOtherUserFavoritesError.yaml b/openapi/components/responses/SeeOtherUserFavoritesError.yaml index b14add75..c66111a9 100644 --- a/openapi/components/responses/SeeOtherUserFavoritesError.yaml +++ b/openapi/components/responses/SeeOtherUserFavoritesError.yaml @@ -1,4 +1,3 @@ -title: SeeOtherUserFavoritesError description: Error response when trying to see favourites of another user without sufficient admin permissions. content: application/json: diff --git a/openapi/components/responses/SeeOtherUserRecentsError.yaml b/openapi/components/responses/SeeOtherUserRecentsError.yaml index b8f3e0e0..eb5aefe8 100644 --- a/openapi/components/responses/SeeOtherUserRecentsError.yaml +++ b/openapi/components/responses/SeeOtherUserRecentsError.yaml @@ -1,4 +1,3 @@ -title: SeeOtherUserRecentsError description: Error response when trying to accept a see recently visited worlds of another user without sufficient admin permissions. content: application/json: diff --git a/openapi/components/responses/WorldNotFoundError.yaml b/openapi/components/responses/WorldNotFoundError.yaml index 621e7977..dbeead76 100644 --- a/openapi/components/responses/WorldNotFoundError.yaml +++ b/openapi/components/responses/WorldNotFoundError.yaml @@ -1,4 +1,3 @@ -title: WorldNotFoundError description: Error response when trying to show information about a non-existent world. Sometimes returns with `model not found` instead of `World Date: Sat, 7 Aug 2021 19:31:24 +0200 Subject: [PATCH 12/15] ci: fix openapi linting with mimetype unicode character --- openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi.yaml b/openapi.yaml index a5c43665..0c72a173 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1550,7 +1550,7 @@ components: id: file_00000000-0000-0000-0000-000000000000 name: Avatar - Test Avatar - Unity package - 2017․4․28f1_3_standalonewindows_Release ownerId: usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469 - mimeType: application⁄gzip + mimeType: application/gzip extension: .unitypackage tags: [] versions: From d7ff2d7ad7de8c7bf1beee7e04688f6c93eab6f2 Mon Sep 17 00:00:00 2001 From: foorack Date: Sat, 7 Aug 2021 20:56:59 +0200 Subject: [PATCH 13/15] feature: add check world publish status endpoint --- openapi.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 0c72a173..8938d799 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1296,6 +1296,34 @@ paths: readOnly: true '404': $ref: ./openapi/components/responses/WorldNotFoundError.yaml + '/worlds/{worldId}/publish': + parameters: + - $ref: '#/components/parameters/worldId' + get: + summary: Get World Publish Status + tags: + - worlds + operationId: getWorldPublish + deprecated: true + description: Returns a worlds publish status. This is currently believed to be unused. + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + additionalProperties: false + properties: + canPubilsh: + type: boolean + default: true + readOnly: true + required: + - canPubilsh + readOnly: true + '404': + $ref: ./openapi/components/responses/WorldNotFoundError.yaml components: schemas: {} securitySchemes: From 178085be86ff795bc71633e3941c5815c1bc961c Mon Sep 17 00:00:00 2001 From: foorack Date: Sat, 7 Aug 2021 21:06:49 +0200 Subject: [PATCH 14/15] feature: add publish and unpublish world endpoints --- openapi.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 8938d799..3eface5b 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1324,6 +1324,24 @@ paths: readOnly: true '404': $ref: ./openapi/components/responses/WorldNotFoundError.yaml + put: + summary: '' + operationId: publishWorld + responses: + '200': + description: OK + '404': + $ref: ./openapi/components/responses/WorldNotFoundError.yaml + description: Publishes a world. You can only publish one world per week. + delete: + summary: '' + operationId: unpublishWorld + responses: + '200': + description: OK + '404': + $ref: ./openapi/components/responses/WorldNotFoundError.yaml + description: Unpublishes a world. components: schemas: {} securitySchemes: From 2624eec0f1c27cc850a8fdc8f8fcc8502177cab4 Mon Sep 17 00:00:00 2001 From: foorack Date: Sat, 7 Aug 2021 21:08:11 +0200 Subject: [PATCH 15/15] fix!: forgotten tags for publish and unpublish --- openapi.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 3eface5b..72b872c2 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1333,6 +1333,8 @@ paths: '404': $ref: ./openapi/components/responses/WorldNotFoundError.yaml description: Publishes a world. You can only publish one world per week. + tags: + - worlds delete: summary: '' operationId: unpublishWorld @@ -1342,6 +1344,8 @@ paths: '404': $ref: ./openapi/components/responses/WorldNotFoundError.yaml description: Unpublishes a world. + tags: + - worlds components: schemas: {} securitySchemes: