Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App-Exchange #132

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
240 changes: 108 additions & 132 deletions docs/everyshilling_openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.0.3
info:
title: Every shillings OpenAPI File Description
title: Every shillings Auth OpenAPI endpoint
description: Every Shilling
version: 2022-04-01
termsOfService: https://everyshilling.ke/terms
Expand Down Expand Up @@ -31,8 +31,6 @@ paths:
in: path
required: true
description: user id
schema:
type: string
responses:
'200':
description: user object response
Expand Down Expand Up @@ -309,8 +307,7 @@ paths:
description: "Password reset request UUID"
required: true
in: path
schema:
type: string

responses:
"200":
description: OTP generated and sent successfully
Expand Down Expand Up @@ -457,11 +454,11 @@ paths:
$ref: "#/components/schemas/LogoutRequest"
responses:
"200":
description: OTP generated and sent successfully
description: User logged out successfully
content:
application/json:
schema:
$ref: "#/components/schemas/PhoneVerificationResponse"
$ref: "#/components/schemas/LogoutResponseData"
"401":
description: "Unauthorized: Invalid or expired token"
"500":
Expand Down Expand Up @@ -494,8 +491,6 @@ paths:
post:
summary: Buy Currencies
description: Endpoint to buy currency
operationId : buycurrency
tags: [BuyCurrency]
requestBody:
required: true
content:
Expand All @@ -515,36 +510,31 @@ paths:


/top-up-account:
post:
summary: Top up Account
description: Endpoint to top up the account
operationId: TopUp
tags : [TopUP]

requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/TopUpRequest"
responses:
'200':
description: Successful operation
post:
summary: Top up Account
description: Endpoint to top up the account
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/TopUpRequestData"
$ref: "#/components/schemas/TopUpRequest"
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: "#/components/schemas/TopUpRequestData"

'400':
description: Invalid request payload
'400':
description: Invalid request payload


/marketplace-offers:
get:
summary: Marketplace Offers
operationId: Offers
description: Endpoint to get marketplace offers
tags: [Offers]
responses:
'200':
description: Successful operation
Expand All @@ -559,8 +549,6 @@ paths:
get:
summary: Account Overview
description: Endpoint to get account overview
operationId : Accountoverview
tags : [AccountOverview]
responses:
'200':
description: Successful operation
Expand All @@ -569,31 +557,20 @@ paths:
schema:
$ref: "#/components/schemas/AccountOverviewResponse"
'400':
description: Invalid request payload
description: Invalid request payload
tags:
- name: Register
description: Registration description
- name: Users
description: Users path


- name: Login
description: Login description

- name: Password Reset
description: Help the user gain access and reset password
- name: Phone Verification
description: Make sure the user's phone is valid inorder to activate the account
- name: Offers
description: Show the available offers

- name: BuyCurrency
description: Buy currency description

- name: TopUp
description: Top up Account
- name : AccountOverview
description: The account overview

components:
securitySchemes:
Expand Down Expand Up @@ -933,42 +910,41 @@ components:
- refresh_token
- bearer_token
ResendNewOTPResponse:
type: object
properties:
message:
type: string
description: "Message"
error:
type: string
description: "Error"
status_code:
type: number
description: "Status code"
data:
$ref: "#/components/schemas/OTPResponseObj"
type: object
properties:
message:
type: string
description: "Message"
error:
type: string
description: "Error"
status_code:
type: number
description: "Status code"
data:
$ref: "#/components/schemas/OTPResponseObj"

PhoneVerificationResponse:
type: object
properties:
message:
type: string
description: "Message"
error:
type: string
description: "Error"
status_code:
type: number
description: "Status code"
data:
type: object
properties:
bearer_token:
type: string
refresh_token:
type: string
required:
- bearer_token
- refresh_token
type: object
properties:
message:
type: string
description: "Message"
error:
type: string
description: "Error"
status_code:
type: number
description: "Status code"
data:
type: object
properties:
bearer_token:
type: string
required: true
refresh_token:
type: string
required: true

BuyRequest:
type: object
Expand Down Expand Up @@ -1000,12 +976,12 @@ components:
data:
$ref: "#/components/schemas/BuyRequestObj"
BuyRequestObj:
type: object
properties:
buyId:
type: integer
description: "The unique identifier of the buy request"
example: 1234
type: object
properties:
buyId:
type: integer
description: "The unique identifier of the buy request"
example: 1234
TopUpRequest:
type: object
properties:
Expand All @@ -1016,25 +992,25 @@ components:
type: number

TopUpRequestData:
type: object
properties:
message:
type: string
example: "Your account has been topped up"
error:
type: string
code:
type: number
example: 200
data:
$ref: "#/components/schemas/TopUpResponseObj"
type: object
properties:
message:
type: string
example: "Your account has been topped up"
error:
type: string
code:
type: number
example: 200
data:
$ref: "#/components/schemas/TopUpResponseObj"
TopUpResponseObj:
type: object
properties:
topUpId:
type: integer
description: "The unique identifier of the top-up request"
example: 1234
type: object
properties:
topUpId:
type: integer
description: "The unique identifier of the top-up request"
example: 1234

MarketplaceOffersResponse:
type: object
Expand All @@ -1049,41 +1025,41 @@ components:
type: number
description: Conversion rate from US Dollar to Kenyan Shilling
data:
$ref: "#/components/schemas/MarketplaceOffersResponseObj"
$ref: "#/components/schemas/MarketplaceOffersResponseObj"
MarketplaceOffersResponseObj:
type: array
items:
type: array
items:
type: object
properties:
currency:
type: string
description: Currency code
example: "USD"
rate:
type: number
description: Exchange rate for the currency
example: 110.0

AccountOverviewResponse:
type: object
properties:
currency:
type: string
description: Currency code
example: "USD"
rate:
balance:
type: number
description: Exchange rate for the currency
example: 110.0

AccountOverviewResponse:
type: object
properties:
balance:
type: number
description: Current account balance
paymentDetails:
type: object
properties:
amountPaid:
type: number
description: Amount paid in the transaction
remainingBalance:
type: number
description: Remaining balance after the transaction
transactionSummary:
type: object
description: Summary or details of the payment made
data:
$ref: "#/components/schemas/AccountOverviewResponseObj"
description: Current account balance
paymentDetails:
type: object
properties:
amountPaid:
type: number
description: Amount paid in the transaction
remainingBalance:
type: number
description: Remaining balance after the transaction
transactionSummary:
type: object
description: Summary or details of the payment made
data:
$ref: "#/components/schemas/AccountOverviewResponseObj"
AccountOverviewResponseObj:
type: object
properties:
Expand Down
1 change: 0 additions & 1 deletion sdk/go-proto-gen
Submodule go-proto-gen deleted from b5df80
4 changes: 2 additions & 2 deletions services/app-auth/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ module github.com/AppsLab-KE/backend-everyshilling/services/app-authentication
go 1.19

require (
github.com/AppsLab-KE/be-go-gen-grpc v0.0.13
github.com/AppsLab-KE/be-go-gen-grpc v0.0.16
github.com/deepmap/oapi-codegen v1.12.4
github.com/gin-gonic/gin v1.9.0
github.com/golang-jwt/jwt/v5 v5.0.0-rc.2
github.com/golang/protobuf v1.5.2
github.com/google/uuid v1.3.0
github.com/hashicorp/consul/api v1.20.0
github.com/redis/go-redis/v9 v9.0.3
Expand All @@ -29,7 +30,6 @@ require (
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.11.2 // indirect
github.com/goccy/go-json v0.10.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
github.com/hashicorp/go-hclog v0.12.0 // indirect
github.com/hashicorp/go-immutable-radix v1.0.0 // indirect
Expand Down
5 changes: 3 additions & 2 deletions services/app-auth/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
github.com/AppsLab-KE/be-go-gen-grpc v0.0.13 h1:x3nsaE7AAiLI1xSKBtHkgzpjWY9sxSeVCD+0Vk9jW9g=
github.com/AppsLab-KE/be-go-gen-grpc v0.0.13/go.mod h1:F0zAKKv7O9FfplN/28CsWBRJu2ZArWNgIZbix6isDKY=

github.com/AppsLab-KE/be-go-gen-grpc v0.0.16 h1:qu0xjUhyBurj1uQvrGJxrPUEZy4XgMm878wh44rKre8=
github.com/AppsLab-KE/be-go-gen-grpc v0.0.16/go.mod h1:F0zAKKv7O9FfplN/28CsWBRJu2ZArWNgIZbix6isDKY=
github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk=
github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ=
github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk=
Expand Down
Loading