From 6f991ca9bf2cd8cd496d8ace2390a7c1543bf5b4 Mon Sep 17 00:00:00 2001 From: Miner28_3 Date: Thu, 4 Jan 2024 05:45:50 +0100 Subject: [PATCH 1/2] Group Search API --- openapi/components/paths/groups.yaml | 20 ++++++++ .../groups/LimitedGroupListResponse.yaml | 7 +++ openapi/components/schemas/LimitedGroup.yaml | 49 +++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 openapi/components/responses/groups/LimitedGroupListResponse.yaml create mode 100644 openapi/components/schemas/LimitedGroup.yaml diff --git a/openapi/components/paths/groups.yaml b/openapi/components/paths/groups.yaml index f17e6765..a71f1d90 100644 --- a/openapi/components/paths/groups.yaml +++ b/openapi/components/paths/groups.yaml @@ -5,6 +5,26 @@ info: description: Group Docs Here paths: /groups: + get: + summary: Search Group + description: Searches Groups by name or shortCode + operationId: searchGroups + tags: + - groups + parameters: + - in: query + name: query + schema: + type: string + required: false + description: Query to search for, can be either Group Name or Group shortCode + - $ref: ../parameters.yaml#/offset + - $ref: ../parameters.yaml#/number + responses: + '200': + $ref: ../responses/groups/LimitedGroupListResponse.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml post: summary: Create Group description: Creates a Group and returns a Group object. **Requires VRC+ Subscription.** diff --git a/openapi/components/responses/groups/LimitedGroupListResponse.yaml b/openapi/components/responses/groups/LimitedGroupListResponse.yaml new file mode 100644 index 00000000..3bb0a2b6 --- /dev/null +++ b/openapi/components/responses/groups/LimitedGroupListResponse.yaml @@ -0,0 +1,7 @@ +description: Returns a single Group object. +content: + application/json: + schema: + type: array + items: + $ref: ../../schemas/LimitedGroup.yaml \ No newline at end of file diff --git a/openapi/components/schemas/LimitedGroup.yaml b/openapi/components/schemas/LimitedGroup.yaml new file mode 100644 index 00000000..f6a8ebd5 --- /dev/null +++ b/openapi/components/schemas/LimitedGroup.yaml @@ -0,0 +1,49 @@ +title: Group +type: object +properties: + id: + $ref: ./GroupID.yaml + name: + type: string + shortCode: + $ref: ./GroupShortCode.yaml + discriminator: + $ref: ./GroupDiscriminator.yaml + description: + type: string + iconUrl: + type: string + nullable: true + bannerUrl: + type: string + nullable: true + ownerId: + $ref: ./UserID.yaml + rules: + type: string + nullable: true + iconId: + type: string + nullable: true + bannerId: + type: string + nullable: true + memberCount: + type: integer + tags: + description: ' ' + type: array + items: + $ref: ./Tag.yaml + createdAt: + type: string + format: date-time + membershipStatus: + $ref: ./GroupMemberStatus.yaml + isSearchable: + type: boolean + galleries: + description: ' ' + type: array + items: + $ref: ./GroupGallery.yaml From 66cd2dd3cd0f23e639acb7b6c2a18ac7f8510dad Mon Sep 17 00:00:00 2001 From: Miner28_3 Date: Thu, 4 Jan 2024 05:49:12 +0100 Subject: [PATCH 2/2] Fix Copy-Pasting issues --- .../components/responses/groups/LimitedGroupListResponse.yaml | 2 +- openapi/components/schemas/LimitedGroup.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi/components/responses/groups/LimitedGroupListResponse.yaml b/openapi/components/responses/groups/LimitedGroupListResponse.yaml index 3bb0a2b6..0923dff4 100644 --- a/openapi/components/responses/groups/LimitedGroupListResponse.yaml +++ b/openapi/components/responses/groups/LimitedGroupListResponse.yaml @@ -1,4 +1,4 @@ -description: Returns a single Group object. +description: Returns a list of LimitedGroup objects. content: application/json: schema: diff --git a/openapi/components/schemas/LimitedGroup.yaml b/openapi/components/schemas/LimitedGroup.yaml index f6a8ebd5..8383b0f8 100644 --- a/openapi/components/schemas/LimitedGroup.yaml +++ b/openapi/components/schemas/LimitedGroup.yaml @@ -1,4 +1,4 @@ -title: Group +title: LimitedGroup type: object properties: id: