From a5d7ad8d658191d499821eff1d1cc50eb6040136 Mon Sep 17 00:00:00 2001 From: mhrynenko <108219165+mhrynenko@users.noreply.github.com> Date: Wed, 19 Jun 2024 09:17:24 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=2005695?= =?UTF-8?q?bd8546bafae15073968f1add99bb2742dc9=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openapi.json | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++ openapi.yaml | 54 ++++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+) diff --git a/openapi.json b/openapi.json index 60368de..6c08b36 100644 --- a/openapi.json +++ b/openapi.json @@ -210,6 +210,41 @@ } } }, + "/token/details": { + "get": { + "tags": [ + "Tokens" + ], + "summary": "Get details", + "description": "Get service token's details", + "operationId": "GetDetails", + "responses": { + "200": { + "content": { + "application/vnd.api+json": { + "schema": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/TokenDetails" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/invalidParameter" + }, + "500": { + "$ref": "#/components/responses/internalError" + } + } + } + }, "/transfer": { "post": { "tags": [ @@ -782,6 +817,53 @@ } ] }, + "TokenDetails": { + "allOf": [ + { + "$ref": "#/components/schemas/TokenKey" + }, + { + "type": "object", + "required": [ + "attributes" + ], + "properties": { + "attributes": { + "type": "object", + "required": [ + "name", + "symbol", + "decimals", + "image" + ], + "properties": { + "name": { + "type": "string", + "description": "ERC20 token name", + "example": "USD Dollar" + }, + "symbol": { + "type": "string", + "description": "ERC20 token symbol", + "example": "USDD" + }, + "decimals": { + "type": "integer", + "format": "uint8", + "description": "ERC20 token decimals", + "example": 12 + }, + "image": { + "type": "string", + "description": "ERC20 token symbol image", + "example": "https://image_link/usdd.png" + } + } + } + } + } + ] + }, "TokenKey": { "type": "object", "required": [ diff --git a/openapi.yaml b/openapi.yaml index 48584bf..b15c086 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -131,6 +131,28 @@ paths: $ref: '#/components/responses/invalidParameter' '500': $ref: '#/components/responses/internalError' + /token/details: + get: + tags: + - Tokens + summary: Get details + description: Get service token's details + operationId: GetDetails + responses: + '200': + content: + application/vnd.api+json: + schema: + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/TokenDetails' + '400': + $ref: '#/components/responses/invalidParameter' + '500': + $ref: '#/components/responses/internalError' /transfer: post: tags: @@ -509,6 +531,38 @@ components: type: string description: Permit message hash built by ERC-2612 standard that has to be signed by token owner. example: '0x3f77218a74501051ac9f069e73523519e6a6cf34783811515da5a178e86634ca' + TokenDetails: + allOf: + - $ref: '#/components/schemas/TokenKey' + - type: object + required: + - attributes + properties: + attributes: + type: object + required: + - name + - symbol + - decimals + - image + properties: + name: + type: string + description: ERC20 token name + example: USD Dollar + symbol: + type: string + description: ERC20 token symbol + example: USDD + decimals: + type: integer + format: uint8 + description: ERC20 token decimals + example: 12 + image: + type: string + description: ERC20 token symbol image + example: 'https://image_link/usdd.png' TokenKey: type: object required: