swagger.json 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "title": "go-common api",
  5. "description": "api",
  6. "version": "1.0",
  7. "contact": {
  8. "email": "lintanghui@bilibili.com"
  9. },
  10. "license": {
  11. "name": "Apache 2.0",
  12. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  13. }
  14. },
  15. "paths": {
  16. "/x/admin/apm/need/add": {
  17. "post": {
  18. "operationId": "/x/admin/apm/need/add",
  19. "parameters": [
  20. {
  21. "in": "query",
  22. "name": "title",
  23. "required": true,
  24. "type": "string"
  25. },
  26. {
  27. "in": "query",
  28. "name": "content",
  29. "required": true,
  30. "type": "string"
  31. }
  32. ],
  33. "responses": {
  34. "200": {
  35. "description": "服务成功响应内容",
  36. "schema": {
  37. "type": "object",
  38. "properties": {
  39. "code": {
  40. "description": "错误码描述",
  41. "type": "integer"
  42. },
  43. "data": {
  44. "$ref": "#/definitions/EmpResp",
  45. "type": "object"
  46. },
  47. "message": {
  48. "description": "错误码文本描述",
  49. "type": "string"
  50. },
  51. "ttl": {
  52. "description": "客户端限速时间",
  53. "type": "integer",
  54. "format": "int64"
  55. }
  56. }
  57. }
  58. }
  59. }
  60. }
  61. },
  62. "/x/admin/apm/need/edit": {
  63. "post": {
  64. "operationId": "/x/admin/apm/need/edit",
  65. "parameters": [
  66. {
  67. "in": "query",
  68. "name": "content",
  69. "type": "string"
  70. },
  71. {
  72. "in": "query",
  73. "name": "id",
  74. "required": true,
  75. "type": "integer",
  76. "format": "int64"
  77. },
  78. {
  79. "in": "query",
  80. "name": "title",
  81. "type": "string"
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "服务成功响应内容",
  87. "schema": {
  88. "type": "object",
  89. "properties": {
  90. "code": {
  91. "description": "错误码描述",
  92. "type": "integer"
  93. },
  94. "data": {
  95. "$ref": "#/definitions/EmpResp",
  96. "type": "object"
  97. },
  98. "message": {
  99. "description": "错误码文本描述",
  100. "type": "string"
  101. },
  102. "ttl": {
  103. "description": "客户端限速时间",
  104. "type": "integer",
  105. "format": "int64"
  106. }
  107. }
  108. }
  109. }
  110. }
  111. }
  112. },
  113. "/x/admin/apm/need/list": {
  114. "get": {
  115. "operationId": "/x/admin/apm/need/list",
  116. "parameters": [
  117. {
  118. "in": "query",
  119. "name": "ps",
  120. "description": " 默认值 20",
  121. "type": "integer",
  122. "format": "int64"
  123. },
  124. {
  125. "in": "query",
  126. "name": "pn",
  127. "description": " 默认值 1",
  128. "type": "integer",
  129. "format": "int64"
  130. },
  131. {
  132. "in": "query",
  133. "name": "status",
  134. "type": "integer",
  135. "format": "int64"
  136. },
  137. {
  138. "in": "query",
  139. "name": "reporter",
  140. "type": "string"
  141. }
  142. ],
  143. "responses": {
  144. "200": {
  145. "description": "服务成功响应内容",
  146. "schema": {
  147. "type": "object",
  148. "properties": {
  149. "code": {
  150. "description": "错误码描述",
  151. "type": "integer"
  152. },
  153. "data": {
  154. "$ref": "#/definitions/NListResp",
  155. "type": "object"
  156. },
  157. "message": {
  158. "description": "错误码文本描述",
  159. "type": "string"
  160. },
  161. "ttl": {
  162. "description": "客户端限速时间",
  163. "type": "integer",
  164. "format": "int64"
  165. }
  166. }
  167. }
  168. }
  169. }
  170. }
  171. },
  172. "/x/admin/apm/need/thumbsup": {
  173. "post": {
  174. "operationId": "/x/admin/apm/need/thumbsup",
  175. "parameters": [
  176. {
  177. "in": "query",
  178. "name": "like_type",
  179. "type": "integer",
  180. "format": "int32"
  181. },
  182. {
  183. "in": "query",
  184. "name": "req_id",
  185. "required": true,
  186. "type": "integer",
  187. "format": "int64"
  188. }
  189. ],
  190. "responses": {
  191. "200": {
  192. "description": "服务成功响应内容",
  193. "schema": {
  194. "type": "object",
  195. "properties": {
  196. "code": {
  197. "description": "错误码描述",
  198. "type": "integer"
  199. },
  200. "data": {
  201. "$ref": "#/definitions/EmpResp",
  202. "type": "object"
  203. },
  204. "message": {
  205. "description": "错误码文本描述",
  206. "type": "string"
  207. },
  208. "ttl": {
  209. "description": "客户端限速时间",
  210. "type": "integer",
  211. "format": "int64"
  212. }
  213. }
  214. }
  215. }
  216. }
  217. }
  218. },
  219. "/x/admin/apm/need/verify": {
  220. "post": {
  221. "operationId": "/x/admin/apm/need/verify",
  222. "parameters": [
  223. {
  224. "in": "query",
  225. "name": "id",
  226. "required": true,
  227. "type": "integer",
  228. "format": "int64"
  229. },
  230. {
  231. "in": "query",
  232. "name": "status",
  233. "required": true,
  234. "type": "integer",
  235. "format": "int64"
  236. }
  237. ],
  238. "responses": {
  239. "200": {
  240. "description": "服务成功响应内容",
  241. "schema": {
  242. "type": "object",
  243. "properties": {
  244. "code": {
  245. "description": "错误码描述",
  246. "type": "integer"
  247. },
  248. "data": {
  249. "$ref": "#/definitions/EmpResp",
  250. "type": "object"
  251. },
  252. "message": {
  253. "description": "错误码文本描述",
  254. "type": "string"
  255. },
  256. "ttl": {
  257. "description": "客户端限速时间",
  258. "type": "integer",
  259. "format": "int64"
  260. }
  261. }
  262. }
  263. }
  264. }
  265. }
  266. },
  267. "/x/admin/apm/ut/detail/list": {
  268. "get": {
  269. "operationId": "/x/admin/apm/ut/detail/list",
  270. "parameters": [
  271. {
  272. "in": "query",
  273. "name": "merge_id",
  274. "type": "integer",
  275. "format": "int64"
  276. },
  277. {
  278. "in": "query",
  279. "name": "commit_id",
  280. "type": "string"
  281. }
  282. ],
  283. "responses": {
  284. "200": {
  285. "description": "服务成功响应内容",
  286. "schema": {
  287. "type": "object",
  288. "properties": {
  289. "code": {
  290. "description": "错误码描述",
  291. "type": "integer"
  292. },
  293. "data": {
  294. "$ref": "#/definitions/Detail",
  295. "type": "object"
  296. },
  297. "message": {
  298. "description": "错误码文本描述",
  299. "type": "string"
  300. },
  301. "ttl": {
  302. "description": "客户端限速时间",
  303. "type": "integer",
  304. "format": "int64"
  305. }
  306. }
  307. }
  308. }
  309. }
  310. }
  311. },
  312. "/x/admin/apm/ut/history/commit": {
  313. "get": {
  314. "operationId": "/x/admin/apm/ut/history/commit",
  315. "parameters": [
  316. {
  317. "in": "query",
  318. "name": "merge_id",
  319. "required": true,
  320. "type": "integer",
  321. "format": "int64"
  322. },
  323. {
  324. "in": "query",
  325. "name": "commit_id",
  326. "type": "string"
  327. },
  328. {
  329. "in": "query",
  330. "name": "pn",
  331. "description": " 默认值 1",
  332. "type": "integer",
  333. "format": "int64"
  334. },
  335. {
  336. "in": "query",
  337. "name": "ps",
  338. "description": " 默认值 20",
  339. "type": "integer",
  340. "format": "int64"
  341. }
  342. ],
  343. "responses": {
  344. "200": {
  345. "description": "服务成功响应内容",
  346. "schema": {
  347. "type": "object",
  348. "properties": {
  349. "code": {
  350. "description": "错误码描述",
  351. "type": "integer"
  352. },
  353. "data": {
  354. "$ref": "#/definitions/HistoryCommitResp",
  355. "type": "object"
  356. },
  357. "message": {
  358. "description": "错误码文本描述",
  359. "type": "string"
  360. },
  361. "ttl": {
  362. "description": "客户端限速时间",
  363. "type": "integer",
  364. "format": "int64"
  365. }
  366. }
  367. }
  368. }
  369. }
  370. }
  371. },
  372. "/x/admin/apm/ut/info/list": {
  373. "get": {
  374. "operationId": "/x/admin/apm/ut/info/list",
  375. "parameters": [
  376. {
  377. "in": "query",
  378. "name": "merge_id",
  379. "description": " 默认值 0",
  380. "type": "integer",
  381. "format": "int64"
  382. },
  383. {
  384. "in": "query",
  385. "name": "username",
  386. "type": "string"
  387. },
  388. {
  389. "in": "query",
  390. "name": "pn",
  391. "description": " 默认值 1",
  392. "type": "integer",
  393. "format": "int64"
  394. },
  395. {
  396. "in": "query",
  397. "name": "ps",
  398. "description": " 默认值 20",
  399. "type": "integer",
  400. "format": "int64"
  401. }
  402. ],
  403. "responses": {
  404. "200": {
  405. "description": "服务成功响应内容",
  406. "schema": {
  407. "type": "object",
  408. "properties": {
  409. "code": {
  410. "description": "错误码描述",
  411. "type": "integer"
  412. },
  413. "data": {
  414. "$ref": "#/definitions/Paper",
  415. "type": "object"
  416. },
  417. "message": {
  418. "description": "错误码文本描述",
  419. "type": "string"
  420. },
  421. "ttl": {
  422. "description": "客户端限速时间",
  423. "type": "integer",
  424. "format": "int64"
  425. }
  426. }
  427. }
  428. }
  429. }
  430. }
  431. },
  432. "/x/admin/need/vote/list": {
  433. "get": {
  434. "operationId": "/x/admin/need/vote/list",
  435. "parameters": [
  436. {
  437. "in": "query",
  438. "name": "req_id",
  439. "required": true,
  440. "type": "integer",
  441. "format": "int64"
  442. },
  443. {
  444. "in": "query",
  445. "name": "like_type",
  446. "type": "integer",
  447. "format": "int32"
  448. }
  449. ],
  450. "responses": {
  451. "200": {
  452. "description": "服务成功响应内容",
  453. "schema": {
  454. "type": "object",
  455. "properties": {
  456. "code": {
  457. "description": "错误码描述",
  458. "type": "integer"
  459. },
  460. "data": {
  461. "$ref": "#/definitions/VoteListResp",
  462. "type": "object"
  463. },
  464. "message": {
  465. "description": "错误码文本描述",
  466. "type": "string"
  467. },
  468. "ttl": {
  469. "description": "客户端限速时间",
  470. "type": "integer",
  471. "format": "int64"
  472. }
  473. }
  474. }
  475. }
  476. }
  477. }
  478. }
  479. },
  480. "definitions": {
  481. "Detail": {
  482. "title": "Detail",
  483. "description": "Detail ut_detail",
  484. "type": "object",
  485. "properties": {
  486. "Assertions": {
  487. "type": "integer",
  488. "format": "int64"
  489. },
  490. "CTime": {
  491. "type": "string",
  492. "format": "string"
  493. },
  494. "CommitID": {
  495. "type": "string"
  496. },
  497. "Coverage": {
  498. "type": "string"
  499. },
  500. "Failures": {
  501. "type": "integer",
  502. "format": "int64"
  503. },
  504. "HTMLURL": {
  505. "type": "string"
  506. },
  507. "ID": {
  508. "type": "integer",
  509. "format": "int64"
  510. },
  511. "MTime": {
  512. "type": "string",
  513. "format": "string"
  514. },
  515. "MergeID": {
  516. "type": "integer",
  517. "format": "int64"
  518. },
  519. "PKG": {
  520. "type": "string"
  521. },
  522. "Panics": {
  523. "type": "integer",
  524. "format": "int64"
  525. },
  526. "PassRate": {
  527. "type": "string"
  528. },
  529. "Passed": {
  530. "type": "integer",
  531. "format": "int64"
  532. },
  533. "ReportURL": {
  534. "type": "string"
  535. },
  536. "Skipped": {
  537. "type": "integer",
  538. "format": "int64"
  539. },
  540. "Username": {
  541. "type": "string"
  542. }
  543. }
  544. },
  545. "EmpResp": {
  546. "title": "EmpResp",
  547. "description": "EmpResp is empty resp.",
  548. "type": "object"
  549. },
  550. "HistoryCommitResp": {
  551. "title": "HistoryCommitResp",
  552. "description": "HistoryCommitResp struct",
  553. "type": "object",
  554. "properties": {
  555. "Assertions": {
  556. "type": "integer",
  557. "format": "int64"
  558. },
  559. "CommitID": {
  560. "type": "string"
  561. },
  562. "CovChange": {
  563. "type": "string"
  564. },
  565. "Coverage": {
  566. "type": "string"
  567. },
  568. "Failures": {
  569. "type": "integer",
  570. "format": "int64"
  571. },
  572. "ID": {
  573. "type": "integer",
  574. "format": "int64"
  575. },
  576. "MergeID": {
  577. "type": "integer",
  578. "format": "int64"
  579. },
  580. "Panics": {
  581. "type": "integer",
  582. "format": "int64"
  583. },
  584. "PassRate": {
  585. "type": "string"
  586. },
  587. "Passed": {
  588. "type": "integer",
  589. "format": "int64"
  590. },
  591. "Skipped": {
  592. "type": "integer",
  593. "format": "int64"
  594. }
  595. }
  596. },
  597. "NInfo": {
  598. "title": "NInfo",
  599. "description": "NInfo struct",
  600. "type": "object",
  601. "properties": {
  602. "CTime": {
  603. "type": "string",
  604. "format": "string"
  605. },
  606. "Content": {
  607. "type": "string"
  608. },
  609. "DislikeCounts": {
  610. "type": "integer",
  611. "format": "int64"
  612. },
  613. "ID": {
  614. "type": "integer",
  615. "format": "int64"
  616. },
  617. "LikeCounts": {
  618. "type": "integer",
  619. "format": "int64"
  620. },
  621. "LikeState": {
  622. "type": "integer",
  623. "format": "int32"
  624. },
  625. "MTime": {
  626. "type": "string",
  627. "format": "string"
  628. },
  629. "Reporter": {
  630. "type": "string"
  631. },
  632. "Status": {
  633. "type": "integer",
  634. "format": "int32"
  635. },
  636. "Title": {
  637. "type": "string"
  638. }
  639. }
  640. },
  641. "NListResp": {
  642. "title": "NListResp",
  643. "description": "NListResp is list resp struct",
  644. "type": "object",
  645. "properties": {
  646. "Data": {
  647. "type": "array",
  648. "items": {
  649. "$ref": "#/definitions/NInfo",
  650. "type": "object"
  651. }
  652. },
  653. "Total": {
  654. "type": "integer",
  655. "format": "int64"
  656. }
  657. }
  658. },
  659. "Paper": {
  660. "title": "Paper",
  661. "description": "Paper canallist resp",
  662. "type": "object",
  663. "properties": {
  664. "Items": {
  665. "$ref": "#/definitions/false",
  666. "type": "object"
  667. },
  668. "Pn": {
  669. "type": "integer",
  670. "format": "int64"
  671. },
  672. "Ps": {
  673. "type": "integer",
  674. "format": "int64"
  675. },
  676. "Total": {
  677. "type": "integer",
  678. "format": "int64"
  679. }
  680. }
  681. },
  682. "UserLikes": {
  683. "title": "UserLikes",
  684. "description": "UserLikes struct",
  685. "type": "object",
  686. "properties": {
  687. "CTime": {
  688. "type": "string",
  689. "format": "string"
  690. },
  691. "ID": {
  692. "type": "integer",
  693. "format": "int64"
  694. },
  695. "LikeType": {
  696. "type": "integer",
  697. "format": "int32"
  698. },
  699. "MTime": {
  700. "type": "string",
  701. "format": "string"
  702. },
  703. "ReqID": {
  704. "type": "integer",
  705. "format": "int64"
  706. },
  707. "User": {
  708. "type": "string"
  709. }
  710. }
  711. },
  712. "VoteListResp": {
  713. "title": "VoteListResp",
  714. "description": "VoteListResp is vote resp struct",
  715. "type": "object",
  716. "properties": {
  717. "Data": {
  718. "type": "array",
  719. "items": {
  720. "$ref": "#/definitions/UserLikes",
  721. "type": "object"
  722. }
  723. },
  724. "Total": {
  725. "type": "integer",
  726. "format": "int64"
  727. }
  728. }
  729. },
  730. "false": null
  731. }
  732. }