Yimaru-BackEnd/docs/swagger.yaml
2025-03-29 06:25:19 +03:00

173 lines
4.1 KiB
YAML

definitions:
httpserver.loginCustomerReq:
properties:
email:
example: john.doe@example.com
type: string
password:
example: password123
type: string
phone_number:
example: "1234567890"
type: string
type: object
httpserver.loginCustomerRes:
properties:
access_token:
type: string
refresh_token:
type: string
type: object
httpserver.logoutReq:
properties:
refresh_token:
type: string
type: object
httpserver.refreshToken:
properties:
access_token:
type: string
refresh_token:
type: string
type: object
response.APIResponse:
properties:
data: {}
message:
type: string
metadata: {}
status:
$ref: '#/definitions/response.Status'
timestamp:
type: string
type: object
response.Status:
enum:
- error
- success
type: string
x-enum-varnames:
- Error
- Success
info:
contact:
email: support@swagger.io
name: API Support
url: http://www.swagger.io/support
description: This is server for FortuneBet.
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
termsOfService: http://swagger.io/terms/
title: FortuneBet API
version: "1.0"
paths:
/auth/login:
post:
consumes:
- application/json
description: Login customer
parameters:
- description: Login customer
in: body
name: login
required: true
schema:
$ref: '#/definitions/httpserver.loginCustomerReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/httpserver.loginCustomerRes'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.APIResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
summary: Login customer
tags:
- auth
/auth/logout:
post:
consumes:
- application/json
description: Logout customer
parameters:
- description: Logout customer
in: body
name: logout
required: true
schema:
$ref: '#/definitions/httpserver.logoutReq'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.APIResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.APIResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
summary: Logout customer
tags:
- auth
/auth/refresh:
post:
consumes:
- application/json
description: Refresh token
parameters:
- description: tokens
in: body
name: refresh
required: true
schema:
$ref: '#/definitions/httpserver.refreshToken'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/httpserver.loginCustomerRes'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.APIResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
summary: Refresh token
tags:
- auth
securityDefinitions:
Bearer:
in: header
name: Authorization
type: apiKey
swagger: "2.0"