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