diff --git a/userapi/openapi.yaml b/userapi/openapi.yaml index e52d5cb..4268781 100644 --- a/userapi/openapi.yaml +++ b/userapi/openapi.yaml @@ -52,6 +52,8 @@ paths: $ref: './sensors-dense.yaml' /sessions: $ref: './sessions.yaml' + /sessions/current: + $ref: './sessions-current.yaml' /sessions/{id}: $ref: './sessions-id.yaml' /share: diff --git a/userapi/sessions-current.yaml b/userapi/sessions-current.yaml new file mode 100644 index 0000000..8bc66f3 --- /dev/null +++ b/userapi/sessions-current.yaml @@ -0,0 +1,40 @@ +delete: + summary: Delete the current session + description: Deletes the session used to authorize this request. + operationId: deleteCurrentSession + tags: + - Sessions + security: + - bearerAuth: [] + + responses: + '200': + description: Current session deleted successfully + content: + application/json: + schema: + allOf: + - $ref: '../components/schemas/Success.yaml' + - type: object + properties: + data: + type: object + additionalProperties: false + examples: + success: + value: + result: success + data: {} + + '401': + description: UNAUTHORIZED - Auth token missing or invalid + content: + application/json: + schema: + $ref: '../components/schemas/Error.yaml' + examples: + unauthorized: + value: + result: "error" + error: "UNAUTHORIZED" + code: "ER_UNAUTHORIZED"