UNPKG

@gogoonz/session-manager-api

Version:

Session manager API client

117 lines 3.58 kB
openapi: 3.0.3 servers: - url: 'http://session-manager.bookings.svc.cluster.local:3001' - url: 'http://localhost:3001' info: title: Swagger Session Manager - Swagger 2.0 description: |- Session manager API definations. Used for create session and get session by sessionId. Session stored in Redis. contact: email: Gogoosolution@gmail.com version: 1.0.0 tags: - name: userSession description: Everything about user's session paths: /session: put: tags: - userSession summary: Create user session by session-manager description: Create user session operationId: createUserSession requestBody: description: Create user session content: application/json: schema: $ref: "#/components/schemas/CreateUserSessionBody" required: true responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/UserSession' '404': description: Session not found '405': description: Validation exception /session/{sessionId}: get: tags: - userSession summary: Get user session by sessionId description: Get user session by sessionId operationId: getSessionBySessionId parameters: - name: sessionId in: path required: true schema: type: string responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/UserSession' '400': description: Invalid sessionId supplied '404': description: Session not found components: schemas: UserSession: required: - userId - accessToken - openIdProvider - openIdToken type: object properties: userId: type: string format: uuid example: 52bc1a30-a850-11ed-afa1-0242ac120002 accessToken: type: string format: string example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ openIdProvider: type: string format: string example: discord openIdToken: type: string format: string example: discord sessionId: type: string format: string CreateUserSessionBody: required: - userId - accessToken - openIdProvider - openIdToken type: object properties: userId: type: string format: uuid example: 52bc1a30-a850-11ed-afa1-0242ac120002 accessToken: type: string format: string example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2V4YW1wbGUuYXV0aDAuY29tLyIsImF1ZCI6Imh0dHBzOi8vYXBpLmV4YW1wbGUuY29tL2NhbGFuZGFyL3YxLyIsInN1YiI6InVzcl8xMjMiLCJpYXQiOjE0NTg3ODU3OTYsImV4cCI6MTQ1ODg3MjE5Nn0.CA7eaHjIHz5NxeIJoFK9krqaeZrPLwmMmgI_XiQiIkQ openIdProvider: type: string format: string example: discord openIdToken: type: string format: string example: discord