Skip to content

Commit

Permalink
feat: partial update treetracker-wallet-api.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavkparti committed Aug 18, 2023
1 parent 467583d commit 5ab1c20
Showing 1 changed file with 52 additions and 15 deletions.
67 changes: 52 additions & 15 deletions docs/api/spec/treetracker-wallet-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,39 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bearerToken'
'401':
description: 'Incorrect password for wallet'
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
example:
code: 401
message: 'Invalid Credentials'
'422':
description: 'Missing request parameters'
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
example:
code: 422
message: '\"wallet\" is not allowed to be empty'
'404':
$ref: '#/components/responses/NotFoundError'
description: 'No wallet found with provided wallet name or id'
content:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
example:
code: 404
message: 'Could not find entity by wallet name: bad_wallet'
deprecated: false
/tokens:
get:
tags:
- Token details
summary: Get a list of tokens in the current wallet or managed wallets
summary: Get a list of tokens in the current wallet or managed wallets
description: 'Get a list of for tokens in the current wallet or managed wallets, matching certain parameters'
parameters:
- $ref: '#/components/parameters/treetrackerApiKeyParam'
Expand All @@ -61,7 +86,7 @@ paths:
example: 1
default: 0
- name: wallet
description: Wallet id or name can be specified if the authenticated wallet manages other wallets. The default is to return tokens matching the authenticated wallet
description: Wallet id or name can be specified if the authenticated wallet manages other wallets. The default is to return tokens matching the authenticated wallet
in: query
schema:
$ref: '#/components/schemas/walletNameOrId'
Expand All @@ -74,6 +99,11 @@ paths:
$ref: '#/components/schemas/tokens'
'401':
$ref: '#/components/responses/UnauthorizedError'
'422':
description: 'Missing request parameters'
example:
code: 422
message: '\"limit\" is required'
deprecated: false
'/tokens/{token_uuid}':
get:
Expand Down Expand Up @@ -734,7 +764,7 @@ components:
treetrackerApiKeyParam:
name: TREETRACKER-API-KEY
in: header
description: ''
description: 'API key for authenticating requests to the Treetracker Wallet API'
required: true
style: simple
schema:
Expand All @@ -743,7 +773,7 @@ components:
contentTypeJsonHeader:
name: Content-Type
in: header
description: ''
description: 'Specifies the media type of the request payload'
required: true
style: simple
schema:
Expand Down Expand Up @@ -774,6 +804,8 @@ components:
properties:
bearer:
type: string
example:
bearer: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
tokens:
title: Token query response
type: object
Expand Down Expand Up @@ -844,15 +876,15 @@ components:
type: integer
description: total count of wallets satisfying the query condition
example: 1
query:
type: object
properties:
offset:
type: integer
example: 0
limit:
type: integer
example: 5
query:
type: object
properties:
offset:
type: integer
example: 0
limit:
type: integer
example: 5
walletItem:
title: Wallet Details
properties:
Expand Down Expand Up @@ -1243,14 +1275,14 @@ components:
type: string
format: uuid
example: bc7d4c0d-1ea5-4ead-9fef-b726a34c2d74
responses:
errorResponse:
type: object
properties:
code:
type: integer
message:
type: string
responses:
UnauthorizedError:
description: Access bearer token is missing or invalid
content:
Expand All @@ -1269,6 +1301,11 @@ components:
application/json:
schema:
$ref: '#/components/schemas/errorResponse'
example:
code: 404
message: ''
ValidationError:
description: Validation error - may be missing query parameters
securitySchemes:
httpBearer:
type: http
Expand Down

0 comments on commit 5ab1c20

Please sign in to comment.