From 26135897cb8275708602904fae730cd1bd2d39d3 Mon Sep 17 00:00:00 2001 From: Miner28_3 Date: Fri, 5 Jan 2024 00:26:23 +0100 Subject: [PATCH] Group Search API (#268) * Group Search API * Fix Copy-Pasting issues --- 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..0923dff4 --- /dev/null +++ b/openapi/components/responses/groups/LimitedGroupListResponse.yaml @@ -0,0 +1,7 @@ +description: Returns a list of LimitedGroup objects. +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..8383b0f8 --- /dev/null +++ b/openapi/components/schemas/LimitedGroup.yaml @@ -0,0 +1,49 @@ +title: LimitedGroup +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