trpc.group/trpc-go/trpc-cmdline@v1.0.9/util/apidocs/testcase/openapi_json_param.json (about)

     1  {
     2   "openapi": "3.0.2",
     3   "info": {
     4    "title": "hello",
     5    "description": "The api document of hello.proto",
     6    "version": "2.0"
     7   },
     8   "paths": {
     9    "/helloworld.Hello/ImportMembers": {
    10     "post": {
    11      "summary": "导入用户",
    12      "operationId": "ImportMembers",
    13      "responses": {
    14       "200": {
    15        "description": "ImportMembersReply",
    16        "content": {
    17         "application/json": {
    18          "schema": {
    19           "$ref": "#/components/schemas/helloworld.ImportMembersReply"
    20          }
    21         }
    22        }
    23       }
    24      },
    25      "requestBody": {
    26       "description": "",
    27       "content": {
    28        "application/json": {
    29         "schema": {
    30          "$ref": "#/components/schemas/helloworld.ImportMembersReq"
    31         }
    32        }
    33       }
    34      },
    35      "tags": [
    36       "hello.trpc"
    37      ]
    38     }
    39    },
    40    "/helloworld.Hello/RemoveMembers": {
    41     "post": {
    42      "summary": "移除成员,支持批量移除",
    43      "operationId": "RemoveMembers",
    44      "responses": {
    45       "200": {
    46        "description": "RemoveMembersReply",
    47        "content": {
    48         "application/json": {
    49          "schema": {
    50           "$ref": "#/components/schemas/helloworld.RemoveMembersReply"
    51          }
    52         }
    53        }
    54       }
    55      },
    56      "requestBody": {
    57       "description": "",
    58       "content": {
    59        "application/json": {
    60         "schema": {
    61          "$ref": "#/components/schemas/helloworld.RemoveMembersReq"
    62         }
    63        }
    64       }
    65      },
    66      "tags": [
    67       "hello.trpc"
    68      ]
    69     }
    70    },
    71    "/helloworld.Hello/SearchMembers": {
    72     "post": {
    73      "summary": "添加成员,支持批量添加",
    74      "operationId": "SearchMembers",
    75      "responses": {
    76       "200": {
    77        "description": "SearchMembersReply",
    78        "content": {
    79         "application/json": {
    80          "schema": {
    81           "$ref": "#/components/schemas/helloworld.SearchMembersReply"
    82          }
    83         }
    84        }
    85       }
    86      },
    87      "requestBody": {
    88       "description": "",
    89       "content": {
    90        "application/json": {
    91         "schema": {
    92          "$ref": "#/components/schemas/helloworld.SearchMembersReq"
    93         }
    94        }
    95       }
    96      },
    97      "tags": [
    98       "hello.trpc"
    99      ]
   100     }
   101    },
   102    "/v1/members": {
   103     "delete": {
   104      "summary": "移除成员,支持批量移除",
   105      "operationId": "RemoveMembers2",
   106      "responses": {
   107       "200": {
   108        "description": "RemoveMembersReply",
   109        "content": {
   110         "application/json": {
   111          "schema": {
   112           "$ref": "#/components/schemas/helloworld.RemoveMembersReply"
   113          }
   114         }
   115        }
   116       }
   117      },
   118      "parameters": [
   119       {
   120        "name": "ids",
   121        "in": "query",
   122        "required": false,
   123        "schema": {
   124         "type": "array",
   125         "title": "ids",
   126         "items": {
   127          "type": "integer",
   128          "format": "uint32"
   129         }
   130        }
   131       }
   132      ],
   133      "tags": [
   134       "hello.restful"
   135      ]
   136     },
   137     "get": {
   138      "summary": "添加成员,支持批量添加",
   139      "operationId": "SearchMembers2",
   140      "responses": {
   141       "200": {
   142        "description": "SearchMembersReply",
   143        "content": {
   144         "application/json": {
   145          "schema": {
   146           "$ref": "#/components/schemas/helloworld.SearchMembersReply"
   147          }
   148         }
   149        }
   150       }
   151      },
   152      "parameters": [
   153       {
   154        "name": "domain.id",
   155        "in": "query",
   156        "required": false,
   157        "schema": {
   158         "type": "integer",
   159         "title": "domain.id"
   160        }
   161       },
   162       {
   163        "name": "domain.type",
   164        "in": "query",
   165        "required": false,
   166        "schema": {
   167         "type": "string",
   168         "title": "domain.type"
   169        }
   170       },
   171       {
   172        "name": "page",
   173        "in": "query",
   174        "required": false,
   175        "schema": {
   176         "type": "integer",
   177         "title": "page"
   178        }
   179       },
   180       {
   181        "name": "page_size",
   182        "in": "query",
   183        "required": false,
   184        "schema": {
   185         "type": "integer",
   186         "title": "page_size"
   187        }
   188       },
   189       {
   190        "name": "t",
   191        "in": "query",
   192        "required": false,
   193        "description": " * 0 - A - \n * 1 - B - \n",
   194        "schema": {
   195         "type": "integer",
   196         "title": "t",
   197         "description": " * 0 - A - \n * 1 - B - \n"
   198        }
   199       }
   200      ],
   201      "tags": [
   202       "hello.restful"
   203      ]
   204     }
   205    },
   206    "/v1/members/import": {
   207     "post": {
   208      "summary": "导入用户",
   209      "operationId": "ImportMembers2",
   210      "responses": {
   211       "200": {
   212        "description": "ImportMembersReply",
   213        "content": {
   214         "application/json": {
   215          "schema": {
   216           "$ref": "#/components/schemas/helloworld.ImportMembersReply"
   217          }
   218         }
   219        }
   220       }
   221      },
   222      "requestBody": {
   223       "description": "",
   224       "content": {
   225        "application/json": {
   226         "schema": {
   227          "$ref": "#/components/schemas/helloworld.ImportMembersReq"
   228         }
   229        }
   230       }
   231      },
   232      "tags": [
   233       "hello.restful"
   234      ]
   235     }
   236    },
   237    "/v1/school/members": {
   238     "get": {
   239      "summary": "添加成员,支持批量添加",
   240      "operationId": "SearchMembers3",
   241      "responses": {
   242       "200": {
   243        "description": "SearchMembersReply",
   244        "content": {
   245         "application/json": {
   246          "schema": {
   247           "$ref": "#/components/schemas/helloworld.SearchMembersReply"
   248          }
   249         }
   250        }
   251       }
   252      },
   253      "parameters": [
   254       {
   255        "name": "domain.id",
   256        "in": "query",
   257        "required": false,
   258        "schema": {
   259         "type": "integer",
   260         "title": "domain.id"
   261        }
   262       },
   263       {
   264        "name": "page",
   265        "in": "query",
   266        "required": false,
   267        "schema": {
   268         "type": "integer",
   269         "title": "page"
   270        }
   271       },
   272       {
   273        "name": "page_size",
   274        "in": "query",
   275        "required": false,
   276        "schema": {
   277         "type": "integer",
   278         "title": "page_size"
   279        }
   280       },
   281       {
   282        "name": "t",
   283        "in": "query",
   284        "required": false,
   285        "description": " * 0 - A - \n * 1 - B - \n",
   286        "schema": {
   287         "type": "integer",
   288         "title": "t",
   289         "description": " * 0 - A - \n * 1 - B - \n"
   290        }
   291       }
   292      ],
   293      "tags": [
   294       "hello.restful"
   295      ]
   296     }
   297    },
   298    "/v1/{domain.type}/members/import": {
   299     "post": {
   300      "summary": "导入用户",
   301      "operationId": "ImportMembers3",
   302      "responses": {
   303       "200": {
   304        "description": "ImportMembersReply",
   305        "content": {
   306         "application/json": {
   307          "schema": {
   308           "$ref": "#/components/schemas/helloworld.ImportMembersReply"
   309          }
   310         }
   311        }
   312       }
   313      },
   314      "parameters": [
   315       {
   316        "name": "domain.type",
   317        "in": "path",
   318        "required": true,
   319        "schema": {
   320         "type": "string",
   321         "title": "domain.type"
   322        }
   323       }
   324      ],
   325      "requestBody": {
   326       "description": "",
   327       "content": {
   328        "application/json": {
   329         "schema": {
   330          "$ref": "#/components/schemas/helloworld.ImportMembersReq.aa6718f0a7c001e99386d62d6a0da155"
   331         }
   332        }
   333       }
   334      },
   335      "tags": [
   336       "hello.restful"
   337      ]
   338     }
   339    }
   340   },
   341   "components": {
   342    "schemas": {
   343     "helloworld.Domain": {
   344      "type": "object",
   345      "properties": {
   346       "id": {
   347        "title": "id",
   348        "type": "integer",
   349        "format": "uint32"
   350       },
   351       "type": {
   352        "title": "type",
   353        "type": "string"
   354       }
   355      },
   356      "title": "helloworld.Domain",
   357      "description": "Domain"
   358     },
   359     "helloworld.Domain.aa6718f0a7c001e99386d62d6a0da155": {
   360      "type": "object",
   361      "properties": {
   362       "id": {
   363        "title": "id",
   364        "type": "integer",
   365        "format": "uint32"
   366       }
   367      },
   368      "title": "helloworld.Domain.aa6718f0a7c001e99386d62d6a0da155",
   369      "description": "Domain"
   370     },
   371     "helloworld.ImportMembersReply": {
   372      "type": "object",
   373      "title": "helloworld.ImportMembersReply",
   374      "description": "ImportMembersReply"
   375     },
   376     "helloworld.ImportMembersReq": {
   377      "type": "object",
   378      "properties": {
   379       "domain": {
   380        "title": "domain",
   381        "$ref": "#/components/schemas/helloworld.Domain"
   382       },
   383       "url": {
   384        "title": "url",
   385        "type": "string"
   386       }
   387      },
   388      "title": "helloworld.ImportMembersReq",
   389      "description": "ImportMembersReq"
   390     },
   391     "helloworld.ImportMembersReq.aa6718f0a7c001e99386d62d6a0da155": {
   392      "type": "object",
   393      "properties": {
   394       "domain": {
   395        "title": "domain",
   396        "$ref": "#/components/schemas/helloworld.Domain.aa6718f0a7c001e99386d62d6a0da155"
   397       },
   398       "url": {
   399        "title": "url",
   400        "type": "string"
   401       }
   402      },
   403      "title": "helloworld.ImportMembersReq.aa6718f0a7c001e99386d62d6a0da155",
   404      "description": "ImportMembersReq"
   405     },
   406     "helloworld.RemoveMembersReply": {
   407      "type": "object",
   408      "title": "helloworld.RemoveMembersReply",
   409      "description": "RemoveMembersReply"
   410     },
   411     "helloworld.RemoveMembersReq": {
   412      "type": "object",
   413      "properties": {
   414       "ids": {
   415        "title": "ids",
   416        "type": "array",
   417        "format": "uint32",
   418        "items": {
   419         "type": "integer",
   420         "format": "uint32"
   421        }
   422       }
   423      },
   424      "title": "helloworld.RemoveMembersReq",
   425      "description": "RemoveMembersReq"
   426     },
   427     "helloworld.SearchMembersReply": {
   428      "type": "object",
   429      "properties": {
   430       "members": {
   431        "title": "members",
   432        "type": "array",
   433        "items": {
   434         "$ref": "#/components/schemas/helloworld.SearchMembersReply.Member"
   435        }
   436       },
   437       "total": {
   438        "title": "total",
   439        "type": "integer",
   440        "format": "uint32"
   441       }
   442      },
   443      "title": "helloworld.SearchMembersReply",
   444      "description": "SearchMembersReply"
   445     },
   446     "helloworld.SearchMembersReply.Member": {
   447      "type": "object",
   448      "properties": {
   449       "id": {
   450        "title": "id",
   451        "type": "integer",
   452        "format": "uint32"
   453       }
   454      },
   455      "title": "helloworld.SearchMembersReply.Member",
   456      "description": "Member"
   457     },
   458     "helloworld.SearchMembersReq": {
   459      "type": "object",
   460      "properties": {
   461       "domain": {
   462        "title": "domain",
   463        "$ref": "#/components/schemas/helloworld.Domain"
   464       },
   465       "page": {
   466        "title": "page",
   467        "type": "integer",
   468        "format": "uint32"
   469       },
   470       "page_size": {
   471        "title": "page_size",
   472        "type": "integer",
   473        "format": "uint32"
   474       },
   475       "t": {
   476        "title": "t",
   477        "type": "integer",
   478        "format": "int32",
   479        "description": " * 0 - A - \n * 1 - B - \n",
   480        "enum": [
   481         0,
   482         1
   483        ]
   484       }
   485      },
   486      "title": "helloworld.SearchMembersReq",
   487      "description": "SearchMembersReq"
   488     }
   489    }
   490   }
   491  }