diff --git a/api/openapi/openapi.yaml b/api/openapi/openapi.yaml index ac93402..72da561 100644 --- a/api/openapi/openapi.yaml +++ b/api/openapi/openapi.yaml @@ -76,7 +76,6 @@ paths: /session/create: post: tags: - - user - session description: Create a new session for a user requestBody: @@ -85,6 +84,41 @@ paths: application/json: schema: $ref: '#/components/schemas/SessionCreateRequest' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + type: object + properties: + token: + type: string + example: fakjshdflauhkjhsometokenakjsdhfaksj + '400': + description: Client side error + content: + application/json: + schema: + type: object + properties: + code: + type: string + example: AuthFailure + message: + type: string + example: "wrong email password." + '500': + description: Server side error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrResponse' + /session/delete: + post: + tags: + - session + description: Delete an existing session for a user responses: '200': description: Successful operation @@ -110,13 +144,15 @@ paths: example: AuthFailure message: type: string - example: "wrong email password." + example: "user not logged in." '500': description: Server side error content: application/json: schema: $ref: '#/components/schemas/ErrResponse' + security: + - jwt: [] components: schemas: @@ -161,3 +197,9 @@ components: message: type: string example: "Server internal error." + securitySchemes: + jwt: + name: Bearer authentication + type: http + bearerFormat: "JWT" + scheme: bearer