...

Text file src/github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb/use_go_template.swagger.json

Documentation: github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/proto/examplepb

     1{
     2  "swagger": "2.0",
     3  "info": {
     4    "title": "examples/internal/proto/examplepb/use_go_template.proto",
     5    "version": "version not set"
     6  },
     7  "tags": [
     8    {
     9      "name": "LoginService"
    10    }
    11  ],
    12  "consumes": [
    13    "application/json"
    14  ],
    15  "produces": [
    16    "application/json"
    17  ],
    18  "paths": {
    19    "/v1/example/login": {
    20      "post": {
    21        "summary": "Login",
    22        "description": "Login is a call with the method(s) POST within the \"LoginService\" service.\nIt takes in \"LoginRequest\" and returns a \"LoginReply\".\n\n## LoginRequest\n| Field ID    | Name      | Type                                                       | Description                  |\n| ----------- | --------- | ---------------------------------------------------------  | ---------------------------- | \n| 1 | username | TYPE_STRING | The entered username | \n| 2 | password | TYPE_STRING | The entered password | \n\n## LoginReply\n| Field ID    | Name      | Type                                                       | Description                  |\n| ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | \n| 1 | message | TYPE_STRING |  | \n| 2 | access | TYPE_BOOL | Whether you have access or not |",
    23        "operationId": "LoginService_Login",
    24        "responses": {
    25          "200": {
    26            "description": "A successful response.",
    27            "schema": {
    28              "$ref": "#/definitions/examplepbLoginReply"
    29            }
    30          },
    31          "default": {
    32            "description": "An unexpected error response.",
    33            "schema": {
    34              "$ref": "#/definitions/rpcStatus"
    35            }
    36          }
    37        },
    38        "parameters": [
    39          {
    40            "name": "body",
    41            "in": "body",
    42            "required": true,
    43            "schema": {
    44              "$ref": "#/definitions/examplepbLoginRequest"
    45            }
    46          }
    47        ],
    48        "tags": [
    49          "LoginService"
    50        ]
    51      }
    52    },
    53    "/v1/example/logout": {
    54      "post": {
    55        "summary": "Logout",
    56        "description": "Logout is a call with the method(s) POST within the \"LoginService\" service.\nIt takes in \"LogoutRequest\" and returns a \"LogoutReply\".\n\n## LogoutRequest\n| Field ID    | Name      | Type                                                       | Description                  |\n| ----------- | --------- | ---------------------------------------------------------  | ---------------------------- | \n| 1 | timeoflogout | TYPE_STRING | The time the logout was registered | \n| 2 | test | TYPE_INT32 | This is the title\u003cbr\u003e\u003cbr\u003eThis is the \"Description\" of field test\u003cbr\u003eyou can use as many newlines as you want\u003cbr\u003e\u003cbr\u003e\u003cbr\u003eit will still format the same in the table | \n| 3 | stringarray | []TYPE_STRING | This is an array\u003cbr\u003e\u003cbr\u003eIt displays that using [] infront of the type | \n\n## LogoutReply\n| Field ID    | Name      | Type                                                       | Description                  |\n| ----------- | --------- | ---------------------------------------------------------- | ---------------------------- | \n| 1 | message | TYPE_STRING | Message that tells you whether your\u003cbr\u003elogout was successful or not |",
    57        "operationId": "LoginService_Logout",
    58        "responses": {
    59          "200": {
    60            "description": "A successful response.",
    61            "schema": {
    62              "$ref": "#/definitions/examplepbLogoutReply"
    63            }
    64          },
    65          "default": {
    66            "description": "An unexpected error response.",
    67            "schema": {
    68              "$ref": "#/definitions/rpcStatus"
    69            }
    70          }
    71        },
    72        "parameters": [
    73          {
    74            "name": "body",
    75            "in": "body",
    76            "required": true,
    77            "schema": {
    78              "$ref": "#/definitions/examplepbLogoutRequest"
    79            }
    80          }
    81        ],
    82        "tags": [
    83          "LoginService"
    84        ]
    85      }
    86    }
    87  },
    88  "definitions": {
    89    "examplepbLoginReply": {
    90      "type": "object",
    91      "properties": {
    92        "message": {
    93          "type": "string"
    94        },
    95        "access": {
    96          "type": "boolean",
    97          "title": "Whether you have access or not"
    98        }
    99      }
   100    },
   101    "examplepbLoginRequest": {
   102      "type": "object",
   103      "properties": {
   104        "username": {
   105          "type": "string",
   106          "title": "The entered username"
   107        },
   108        "password": {
   109          "type": "string",
   110          "title": "The entered password"
   111        }
   112      }
   113    },
   114    "examplepbLogoutReply": {
   115      "type": "object",
   116      "properties": {
   117        "message": {
   118          "type": "string",
   119          "title": "Message that tells you whether your\nlogout was successful or not"
   120        }
   121      }
   122    },
   123    "examplepbLogoutRequest": {
   124      "type": "object",
   125      "properties": {
   126        "timeoflogout": {
   127          "type": "string",
   128          "title": "The time the logout was registered"
   129        },
   130        "test": {
   131          "type": "integer",
   132          "format": "int32",
   133          "description": "This is the \"Description\" of field test\nyou can use as many newlines as you want\n\n\nit will still format the same in the table",
   134          "title": "This is the title"
   135        },
   136        "stringarray": {
   137          "type": "array",
   138          "items": {
   139            "type": "string"
   140          },
   141          "description": "It displays that using [] infront of the type",
   142          "title": "This is an array"
   143        }
   144      }
   145    },
   146    "protobufAny": {
   147      "type": "object",
   148      "properties": {
   149        "@type": {
   150          "type": "string"
   151        }
   152      },
   153      "additionalProperties": {}
   154    },
   155    "rpcStatus": {
   156      "type": "object",
   157      "properties": {
   158        "code": {
   159          "type": "integer",
   160          "format": "int32"
   161        },
   162        "message": {
   163          "type": "string"
   164        },
   165        "details": {
   166          "type": "array",
   167          "items": {
   168            "type": "object",
   169            "$ref": "#/definitions/protobufAny"
   170          }
   171        }
   172      }
   173    }
   174  }
   175}

View as plain text