swagger.json 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  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/riot-search/fav/aids": {
  17. "get": {
  18. "operationId": "/x/riot-search/fav/aids",
  19. "parameters": [
  20. {
  21. "in": "query",
  22. "name": "ids",
  23. "description": "数组,按逗号分隔",
  24. "type": "array"
  25. },
  26. {
  27. "in": "query",
  28. "name": "keyword",
  29. "required": true,
  30. "type": "string"
  31. },
  32. {
  33. "in": "query",
  34. "name": "pn",
  35. "description": " 最小值 1",
  36. "type": "integer",
  37. "format": "int64"
  38. },
  39. {
  40. "in": "query",
  41. "name": "ps",
  42. "description": " 最小值 0",
  43. "type": "integer",
  44. "format": "int64"
  45. }
  46. ],
  47. "responses": {
  48. "200": {
  49. "description": "服务成功响应内容",
  50. "schema": {
  51. "type": "object",
  52. "properties": {
  53. "code": {
  54. "description": "错误码描述",
  55. "type": "integer"
  56. },
  57. "data": {
  58. "$ref": "#/definitions/IDsResp",
  59. "type": "object"
  60. },
  61. "message": {
  62. "description": "错误码文本描述",
  63. "type": "string"
  64. },
  65. "ttl": {
  66. "description": "客户端限速时间",
  67. "type": "integer",
  68. "format": "int64"
  69. }
  70. }
  71. }
  72. }
  73. }
  74. }
  75. },
  76. "/x/riot-search/fav/contents": {
  77. "get": {
  78. "operationId": "/x/riot-search/fav/contents",
  79. "parameters": [
  80. {
  81. "in": "query",
  82. "name": "pn",
  83. "description": " 最小值 1",
  84. "type": "integer",
  85. "format": "int64"
  86. },
  87. {
  88. "in": "query",
  89. "name": "ps",
  90. "description": " 最小值 0",
  91. "type": "integer",
  92. "format": "int64"
  93. },
  94. {
  95. "in": "query",
  96. "name": "ids",
  97. "description": "数组,按逗号分隔",
  98. "type": "array"
  99. },
  100. {
  101. "in": "query",
  102. "name": "keyword",
  103. "required": true,
  104. "type": "string"
  105. }
  106. ],
  107. "responses": {
  108. "200": {
  109. "description": "服务成功响应内容",
  110. "schema": {
  111. "type": "object",
  112. "properties": {
  113. "code": {
  114. "description": "错误码描述",
  115. "type": "integer"
  116. },
  117. "data": {
  118. "$ref": "#/definitions/DocumentsResp",
  119. "type": "object"
  120. },
  121. "message": {
  122. "description": "错误码文本描述",
  123. "type": "string"
  124. },
  125. "ttl": {
  126. "description": "客户端限速时间",
  127. "type": "integer",
  128. "format": "int64"
  129. }
  130. }
  131. }
  132. }
  133. }
  134. }
  135. }
  136. },
  137. "definitions": {
  138. "Document": {
  139. "title": "Document",
  140. "description": "Document id and content",
  141. "type": "object",
  142. "properties": {
  143. "Content": {
  144. "type": "string"
  145. },
  146. "ID": {
  147. "type": "integer",
  148. "format": "int64"
  149. }
  150. }
  151. },
  152. "DocumentsResp": {
  153. "title": "DocumentsResp",
  154. "description": "DocumentsResp resp of documents",
  155. "type": "object",
  156. "properties": {
  157. "Documents": {
  158. "type": "array",
  159. "items": {
  160. "$ref": "#/definitions/Document",
  161. "type": "object"
  162. }
  163. },
  164. "Page": {
  165. "$ref": "#/definitions/Page",
  166. "type": "object"
  167. },
  168. "Tokens": {
  169. "type": "array",
  170. "items": {
  171. "type": "string"
  172. }
  173. }
  174. }
  175. },
  176. "IDsResp": {
  177. "title": "IDsResp",
  178. "description": "IDsResp resp of ids",
  179. "type": "object",
  180. "properties": {
  181. "IDs": {
  182. "type": "array",
  183. "items": {
  184. "type": "integer",
  185. "format": "int64"
  186. }
  187. },
  188. "Page": {
  189. "$ref": "#/definitions/Page",
  190. "type": "object"
  191. },
  192. "Tokens": {
  193. "type": "array",
  194. "items": {
  195. "type": "string"
  196. }
  197. }
  198. }
  199. },
  200. "Page": {
  201. "title": "Page",
  202. "description": "Page Pager",
  203. "type": "object",
  204. "properties": {
  205. "PageNum": {
  206. "type": "integer",
  207. "format": "int64"
  208. },
  209. "PageSize": {
  210. "type": "integer",
  211. "format": "int64"
  212. },
  213. "Total": {
  214. "type": "integer",
  215. "format": "int64"
  216. }
  217. }
  218. }
  219. }
  220. }