Created
October 23, 2022 15:44
-
-
Save philiplambok/43f91b67a3e4195bd127284ef9e44588 to your computer and use it in GitHub Desktop.
Learn Open API 3.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
version: 1.0.0 | |
title: P & T Kitchen | |
description: The payment gateway that you don't hate. | |
servers: | |
- url: https://api.kitchen.com/api/v1 | |
- url: https://staging-api.kitchen.com/api/v1 | |
paths: | |
/balances: | |
get: | |
description: Fetch the current balances | |
responses: | |
'200': | |
description: Successful response. | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
amount: | |
type: integer | |
description: The current balance | |
/bank_transfers: | |
post: | |
description: Send money to spesific bank. | |
responses: | |
'201': | |
description: Successful response. | |
security: | |
- ApiKeyAuth: [] | |
components: | |
securitySchemes: | |
ApiKeyAuth: | |
type: apikey | |
in: header | |
name: 'Authorization' |
Author
philiplambok
commented
Oct 23, 2022
openapi: 3.0.0
info:
version: 1.0.0
title: P & T Kitchen
description: The payment gateway that you don't hate.
servers:
- url: https://api.kitchen.com/api/v1
- url: https://staging-api.kitchen.com/api/v1
paths:
/balances:
get:
description: Fetch the current balances
responses:
'200':
description: 'Successful response'
content:
application/json:
schema:
$ref: '#/components/schemas/UserBalance'
/bank_transfers:
post:
description: Send money to spesific bank.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- account_holder_name
- acount_number
- bank_code
- amount
properties:
account_holder_name:
type: string
example: Bill John
account_number:
type: string
example: 12312332
bank_code:
type: string
example: bca
amount:
type: integer
example: 10000
responses:
'201':
description: Successful response.
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
id:
type: number
attributes:
type: object
properties:
account_holder_name:
type: string
example: Bill John
account_number:
type: string
example: 12312332
amount:
type: number
example: 10000
bank_code:
type: string
example: bca
security:
- AuthorizationAuth: []
components:
securitySchemes:
AuthorizationAuth:
type: apiKey
in: header
name: 'Authorization'
schemas:
UserBalance:
type: object
properties:
amount:
type: integer
description: The user's current balance
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment