openapi: 3.1.0 info: contact: email: catalin@roboces.dev name: 185504a9 license: name: GNU General Public License v3.0 or later identifier: GPL-3.0-or-later title: Secret santa description: Secret santa version: 0.1.0 servers: - url: https://secretsanta.roboces.dev/api/v1 paths: /groups/{group_uuid}: put: summary: Create a new group description: > Create a new group for a number of people. This operation returns a list of links that can be shared with each member in order to reveal their pair operationId: CreateGroup parameters: - $ref: '#/components/parameters/GroupUuid' requestBody: content: application/json: schema: $ref: '#/components/schemas/Participants' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/RevealLinks' get: summary: Get group description: > Given an already existing group, retrieve its links operationId: GetGroup parameters: - $ref: '#/components/parameters/GroupUuid' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/RevealLinks' /groups/{group_uuid}/pair/{participant}: get: summary: Get pair description: > Reveal the pair of a given participant operationId: GetParticipantPair parameters: - $ref: '#/components/parameters/GroupUuid' - $ref: '#/components/parameters/Participant' - $ref: '#/components/parameters/ResponseType' responses: '200': $ref: '#/components/responses/ParticipantPairResponse' components: parameters: GroupUuid: in: path name: group_uuid required: true schema: type: string format: uuid4 Participant: in: path name: participant required: true schema: type: string ResponseType: in: query schema: type: string default: plain enum: - plain - json responses: ParticipantPairResponse: content: application/json: schema: $ref: '#/components/schemas/Participant' text/plain: schema: type: string schemas: RevealLinks: type: array items: type: string format: url Participants: type: object properties: participants: type: array items: type: string Participant: type: object properties: pair: type: string