github.com/s7techlab/cckit@v0.10.5/examples/token/service/config_erc20/config_erc20.swagger.json (about)

     1  {
     2    "swagger": "2.0",
     3    "info": {
     4      "title": "token/service/config_erc20/config_erc20.proto",
     5      "version": "version not set"
     6    },
     7    "consumes": [
     8      "application/json"
     9    ],
    10    "produces": [
    11      "application/json"
    12    ],
    13    "paths": {
    14      "/decimals": {
    15        "get": {
    16          "summary": "Returns the number of decimals used to get its user representation.\nFor example, if decimals equals 2, a balance of 505 tokens should be displayed to a user as 5,05 (505 / 10 ** 2).",
    17          "operationId": "ConfigERC20Service_GetDecimals",
    18          "responses": {
    19            "200": {
    20              "description": "A successful response.",
    21              "schema": {
    22                "$ref": "#/definitions/config_erc20DecimalsResponse"
    23              }
    24            },
    25            "default": {
    26              "description": "An unexpected error response.",
    27              "schema": {
    28                "$ref": "#/definitions/runtimeError"
    29              }
    30            }
    31          },
    32          "tags": [
    33            "ConfigERC20Service"
    34          ]
    35        }
    36      },
    37      "/name": {
    38        "get": {
    39          "summary": "Returns the name of the token.",
    40          "operationId": "ConfigERC20Service_GetName",
    41          "responses": {
    42            "200": {
    43              "description": "A successful response.",
    44              "schema": {
    45                "$ref": "#/definitions/config_erc20NameResponse"
    46              }
    47            },
    48            "default": {
    49              "description": "An unexpected error response.",
    50              "schema": {
    51                "$ref": "#/definitions/runtimeError"
    52              }
    53            }
    54          },
    55          "tags": [
    56            "ConfigERC20Service"
    57          ]
    58        }
    59      },
    60      "/symbol": {
    61        "get": {
    62          "summary": "Returns the symbol of the token, usually a shorter version of the name.",
    63          "operationId": "ConfigERC20Service_GetSymbol",
    64          "responses": {
    65            "200": {
    66              "description": "A successful response.",
    67              "schema": {
    68                "$ref": "#/definitions/config_erc20SymbolResponse"
    69              }
    70            },
    71            "default": {
    72              "description": "An unexpected error response.",
    73              "schema": {
    74                "$ref": "#/definitions/runtimeError"
    75              }
    76            }
    77          },
    78          "tags": [
    79            "ConfigERC20Service"
    80          ]
    81        }
    82      },
    83      "/total-supply": {
    84        "get": {
    85          "summary": "Returns the amount of tokens in existence.",
    86          "operationId": "ConfigERC20Service_GetTotalSupply",
    87          "responses": {
    88            "200": {
    89              "description": "A successful response.",
    90              "schema": {
    91                "$ref": "#/definitions/config_erc20TotalSupplyResponse"
    92              }
    93            },
    94            "default": {
    95              "description": "An unexpected error response.",
    96              "schema": {
    97                "$ref": "#/definitions/runtimeError"
    98              }
    99            }
   100          },
   101          "tags": [
   102            "ConfigERC20Service"
   103          ]
   104        }
   105      }
   106    },
   107    "definitions": {
   108      "config_erc20DecimalsResponse": {
   109        "type": "object",
   110        "properties": {
   111          "decimals": {
   112            "type": "integer",
   113            "format": "int64"
   114          }
   115        }
   116      },
   117      "config_erc20NameResponse": {
   118        "type": "object",
   119        "properties": {
   120          "name": {
   121            "type": "string"
   122          }
   123        }
   124      },
   125      "config_erc20SymbolResponse": {
   126        "type": "object",
   127        "properties": {
   128          "symbol": {
   129            "type": "string"
   130          }
   131        }
   132      },
   133      "config_erc20TotalSupplyResponse": {
   134        "type": "object",
   135        "properties": {
   136          "total_supply": {
   137            "type": "string",
   138            "format": "uint64"
   139          }
   140        }
   141      },
   142      "protobufAny": {
   143        "type": "object",
   144        "properties": {
   145          "type_url": {
   146            "type": "string"
   147          },
   148          "value": {
   149            "type": "string",
   150            "format": "byte"
   151          }
   152        }
   153      },
   154      "runtimeError": {
   155        "type": "object",
   156        "properties": {
   157          "error": {
   158            "type": "string"
   159          },
   160          "code": {
   161            "type": "integer",
   162            "format": "int32"
   163          },
   164          "message": {
   165            "type": "string"
   166          },
   167          "details": {
   168            "type": "array",
   169            "items": {
   170              "$ref": "#/definitions/protobufAny"
   171            }
   172          }
   173        }
   174      }
   175    }
   176  }