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

     1  {
     2    "swagger": "2.0",
     3    "info": {
     4      "title": "token/service/account/account.proto",
     5      "version": "version not set"
     6    },
     7    "consumes": [
     8      "application/json"
     9    ],
    10    "produces": [
    11      "application/json"
    12    ],
    13    "paths": {
    14      "/token/accounts/{address}": {
    15        "get": {
    16          "operationId": "AccountService_GetAccount",
    17          "responses": {
    18            "200": {
    19              "description": "A successful response.",
    20              "schema": {
    21                "$ref": "#/definitions/accountAccount"
    22              }
    23            },
    24            "default": {
    25              "description": "An unexpected error response.",
    26              "schema": {
    27                "$ref": "#/definitions/runtimeError"
    28              }
    29            }
    30          },
    31          "parameters": [
    32            {
    33              "name": "address",
    34              "in": "path",
    35              "required": true,
    36              "type": "string"
    37            }
    38          ],
    39          "tags": [
    40            "AccountService"
    41          ]
    42        }
    43      },
    44      "/token/addresses/whoami": {
    45        "get": {
    46          "operationId": "AccountService_GetInvokerAddress",
    47          "responses": {
    48            "200": {
    49              "description": "A successful response.",
    50              "schema": {
    51                "$ref": "#/definitions/accountAddressId"
    52              }
    53            },
    54            "default": {
    55              "description": "An unexpected error response.",
    56              "schema": {
    57                "$ref": "#/definitions/runtimeError"
    58              }
    59            }
    60          },
    61          "tags": [
    62            "AccountService"
    63          ]
    64        }
    65      },
    66      "/token/addresses/{public_key}": {
    67        "get": {
    68          "operationId": "AccountService_GetAddress",
    69          "responses": {
    70            "200": {
    71              "description": "A successful response.",
    72              "schema": {
    73                "$ref": "#/definitions/accountAddressId"
    74              }
    75            },
    76            "default": {
    77              "description": "An unexpected error response.",
    78              "schema": {
    79                "$ref": "#/definitions/runtimeError"
    80              }
    81            }
    82          },
    83          "parameters": [
    84            {
    85              "name": "public_key",
    86              "in": "path",
    87              "required": true,
    88              "type": "string",
    89              "format": "byte"
    90            }
    91          ],
    92          "tags": [
    93            "AccountService"
    94          ]
    95        }
    96      }
    97    },
    98    "definitions": {
    99      "accountAccount": {
   100        "type": "object",
   101        "properties": {
   102          "address": {
   103            "type": "string"
   104          },
   105          "status": {
   106            "$ref": "#/definitions/accountAccountStatus"
   107          }
   108        }
   109      },
   110      "accountAccountStatus": {
   111        "type": "string",
   112        "enum": [
   113          "ACCOUNT_STATUS_UNKNOWN",
   114          "ACCOUNT_STATUS_ENABLED",
   115          "ACCOUNT_STATUS_DISABLED"
   116        ],
   117        "default": "ACCOUNT_STATUS_UNKNOWN"
   118      },
   119      "accountAddressId": {
   120        "type": "object",
   121        "properties": {
   122          "address": {
   123            "type": "string"
   124          }
   125        }
   126      },
   127      "protobufAny": {
   128        "type": "object",
   129        "properties": {
   130          "type_url": {
   131            "type": "string"
   132          },
   133          "value": {
   134            "type": "string",
   135            "format": "byte"
   136          }
   137        }
   138      },
   139      "runtimeError": {
   140        "type": "object",
   141        "properties": {
   142          "error": {
   143            "type": "string"
   144          },
   145          "code": {
   146            "type": "integer",
   147            "format": "int32"
   148          },
   149          "message": {
   150            "type": "string"
   151          },
   152          "details": {
   153            "type": "array",
   154            "items": {
   155              "$ref": "#/definitions/protobufAny"
   156            }
   157          }
   158        }
   159      }
   160    }
   161  }