openapi.yaml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575
  1. # Generated with protoc-gen-openapi
  2. # https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi
  3. openapi: 3.0.3
  4. info:
  5. title: Card API
  6. version: 0.0.1
  7. paths:
  8. /v1/account/create:
  9. post:
  10. tags:
  11. - Card
  12. operationId: Card_CreateAccountUser
  13. requestBody:
  14. content:
  15. application/json:
  16. schema:
  17. $ref: '#/components/schemas/card.CreateAccountUserRequest'
  18. required: true
  19. responses:
  20. "200":
  21. description: OK
  22. content:
  23. application/json:
  24. schema:
  25. $ref: '#/components/schemas/card.CreateAccountUserReply'
  26. /v1/account/login:
  27. post:
  28. tags:
  29. - Card
  30. operationId: Card_LoginAccount
  31. requestBody:
  32. content:
  33. application/json:
  34. schema:
  35. $ref: '#/components/schemas/card.LoginAccountRequest'
  36. required: true
  37. responses:
  38. "200":
  39. description: OK
  40. content:
  41. application/json:
  42. schema:
  43. $ref: '#/components/schemas/card.LoginAccountReply'
  44. /v1/account/wx/login:
  45. post:
  46. tags:
  47. - Card
  48. operationId: Card_WxRegisterLogin
  49. requestBody:
  50. content:
  51. application/json:
  52. schema:
  53. $ref: '#/components/schemas/card.WxRegisterLoginRequest'
  54. required: true
  55. responses:
  56. "200":
  57. description: OK
  58. content:
  59. application/json:
  60. schema:
  61. $ref: '#/components/schemas/card.WxRegisterLoginReply'
  62. /v1/card/create:
  63. post:
  64. tags:
  65. - Card
  66. operationId: Card_CreateCard
  67. requestBody:
  68. content:
  69. application/json:
  70. schema:
  71. $ref: '#/components/schemas/card.CreateCardRequest'
  72. required: true
  73. responses:
  74. "200":
  75. description: OK
  76. content:
  77. application/json:
  78. schema:
  79. $ref: '#/components/schemas/card.CreateCardReply'
  80. /v1/card/del:
  81. post:
  82. tags:
  83. - Card
  84. operationId: Card_DelCard
  85. requestBody:
  86. content:
  87. application/json:
  88. schema:
  89. $ref: '#/components/schemas/card.DelCardInfoRequest'
  90. required: true
  91. responses:
  92. "200":
  93. description: OK
  94. content:
  95. application/json:
  96. schema:
  97. $ref: '#/components/schemas/card.DelCardReply'
  98. /v1/card/info:
  99. post:
  100. tags:
  101. - Card
  102. operationId: Card_GetCardInfo
  103. requestBody:
  104. content:
  105. application/json:
  106. schema:
  107. $ref: '#/components/schemas/card.GetCardInfoRequest'
  108. required: true
  109. responses:
  110. "200":
  111. description: OK
  112. content:
  113. application/json:
  114. schema:
  115. $ref: '#/components/schemas/card.GetCardInfoReply'
  116. /v1/card/ocr:
  117. post:
  118. tags:
  119. - Card
  120. operationId: Card_OCRCard
  121. requestBody:
  122. content:
  123. application/json:
  124. schema:
  125. $ref: '#/components/schemas/card.OCRCardRequest'
  126. required: true
  127. responses:
  128. "200":
  129. description: OK
  130. content:
  131. application/json:
  132. schema:
  133. $ref: '#/components/schemas/card.OCRCardReply'
  134. /v1/card/ossupload:
  135. post:
  136. tags:
  137. - Card
  138. operationId: Card_OssUpload
  139. requestBody:
  140. content:
  141. application/json:
  142. schema:
  143. $ref: '#/components/schemas/card.OssUploadRequest'
  144. required: true
  145. responses:
  146. "200":
  147. description: OK
  148. content:
  149. application/json:
  150. schema:
  151. $ref: '#/components/schemas/card.OssUploadReplay'
  152. /v1/card/save:
  153. post:
  154. tags:
  155. - Card
  156. operationId: Card_SaveCard
  157. requestBody:
  158. content:
  159. application/json:
  160. schema:
  161. $ref: '#/components/schemas/card.SaveCardInfoRequest'
  162. required: true
  163. responses:
  164. "200":
  165. description: OK
  166. content:
  167. application/json:
  168. schema:
  169. $ref: '#/components/schemas/card.SaveCardReply'
  170. /v1/card/search:
  171. post:
  172. tags:
  173. - Card
  174. operationId: Card_SearchCard
  175. requestBody:
  176. content:
  177. application/json:
  178. schema:
  179. $ref: '#/components/schemas/card.SearchCardRequest'
  180. required: true
  181. responses:
  182. "200":
  183. description: OK
  184. content:
  185. application/json:
  186. schema:
  187. $ref: '#/components/schemas/card.SearchCardReply'
  188. /v1/card/templates:
  189. post:
  190. tags:
  191. - Card
  192. operationId: Card_GetTemplates
  193. requestBody:
  194. content:
  195. application/json:
  196. schema:
  197. $ref: '#/components/schemas/card.GetTemplatesRequest'
  198. required: true
  199. responses:
  200. "200":
  201. description: OK
  202. content:
  203. application/json:
  204. schema:
  205. $ref: '#/components/schemas/card.GetTemplatesReply'
  206. /v1/card/token/create:
  207. post:
  208. tags:
  209. - Card
  210. operationId: Card_CreateShareToken
  211. requestBody:
  212. content:
  213. application/json:
  214. schema:
  215. $ref: '#/components/schemas/card.CreateShareTokenRequest'
  216. required: true
  217. responses:
  218. "200":
  219. description: OK
  220. content:
  221. application/json:
  222. schema:
  223. $ref: '#/components/schemas/card.CreateShareTokenReply'
  224. /v1/card/user/bind:
  225. post:
  226. tags:
  227. - Card
  228. operationId: Card_AddCardByShareToken
  229. requestBody:
  230. content:
  231. application/json:
  232. schema:
  233. $ref: '#/components/schemas/card.AddCardByShareTokenRequest'
  234. required: true
  235. responses:
  236. "200":
  237. description: OK
  238. content:
  239. application/json:
  240. schema:
  241. $ref: '#/components/schemas/card.AddCardByShareTokenReply'
  242. /v1/cards:
  243. post:
  244. tags:
  245. - Card
  246. operationId: Card_GetMyCards
  247. requestBody:
  248. content:
  249. application/json:
  250. schema:
  251. $ref: '#/components/schemas/card.GetMyCardsRequest'
  252. required: true
  253. responses:
  254. "200":
  255. description: OK
  256. content:
  257. application/json:
  258. schema:
  259. $ref: '#/components/schemas/card.GetMyCardsReply'
  260. components:
  261. schemas:
  262. aliyun.Oss:
  263. type: object
  264. properties:
  265. AccessKeyId:
  266. type: string
  267. AccessKeySecret:
  268. type: string
  269. SecurityToken:
  270. type: string
  271. Region:
  272. type: string
  273. Bucket:
  274. type: string
  275. card.AddCardByShareTokenReply:
  276. type: object
  277. properties:
  278. ok:
  279. type: boolean
  280. card.AddCardByShareTokenRequest:
  281. type: object
  282. properties:
  283. token:
  284. type: string
  285. card.CreateAccountUserReply:
  286. type: object
  287. properties:
  288. ok:
  289. type: boolean
  290. card.CreateAccountUserRequest:
  291. type: object
  292. properties:
  293. account:
  294. $ref: '#/components/schemas/user.AccountBaseBody'
  295. card.CreateCardReply:
  296. type: object
  297. properties:
  298. id:
  299. type: integer
  300. format: uint32
  301. card.CreateCardRequest:
  302. type: object
  303. properties:
  304. card:
  305. $ref: '#/components/schemas/common.CardBaseBody'
  306. supplements:
  307. type: array
  308. items:
  309. $ref: '#/components/schemas/common.CardSupplementBaseBody'
  310. card.CreateShareTokenReply:
  311. type: object
  312. properties:
  313. token:
  314. type: string
  315. expire:
  316. type: string
  317. card.CreateShareTokenRequest:
  318. type: object
  319. properties:
  320. cardId:
  321. type: integer
  322. format: uint32
  323. card.DelCardInfoRequest:
  324. type: object
  325. properties:
  326. cardId:
  327. type: integer
  328. format: uint32
  329. card.DelCardReply:
  330. type: object
  331. properties:
  332. ok:
  333. type: boolean
  334. card.GetCardInfoReply:
  335. type: object
  336. properties:
  337. card:
  338. $ref: '#/components/schemas/common.CardBaseBody'
  339. supplements:
  340. type: array
  341. items:
  342. $ref: '#/components/schemas/common.CardSupplementBaseBody'
  343. template:
  344. $ref: '#/components/schemas/common.CardTemplateBaseBody'
  345. card.GetCardInfoRequest:
  346. type: object
  347. properties:
  348. cardId:
  349. type: integer
  350. format: uint32
  351. card.GetMyCardsReply:
  352. type: object
  353. properties:
  354. cards:
  355. type: array
  356. items:
  357. $ref: '#/components/schemas/common.CardBody'
  358. supplements:
  359. type: array
  360. items:
  361. $ref: '#/components/schemas/common.CardSupplementBaseBody'
  362. templates:
  363. type: array
  364. items:
  365. $ref: '#/components/schemas/common.CardTemplateBody'
  366. card.GetMyCardsRequest:
  367. type: object
  368. properties: {}
  369. card.GetTemplatesReply:
  370. type: object
  371. properties:
  372. templates:
  373. type: array
  374. items:
  375. $ref: '#/components/schemas/common.CardTemplateBody'
  376. card.GetTemplatesRequest:
  377. type: object
  378. properties: {}
  379. card.LoginAccountReply:
  380. type: object
  381. properties:
  382. token:
  383. type: string
  384. card.LoginAccountRequest:
  385. type: object
  386. properties:
  387. account:
  388. $ref: '#/components/schemas/user.AccountBaseBody'
  389. card.OCRCardReply:
  390. type: object
  391. properties:
  392. body:
  393. $ref: '#/components/schemas/common.CardBaseBody'
  394. supplements:
  395. type: array
  396. items:
  397. $ref: '#/components/schemas/common.CardSupplementBaseBody'
  398. card.OCRCardRequest:
  399. type: object
  400. properties:
  401. url:
  402. type: string
  403. card.OssUploadReplay:
  404. type: object
  405. properties:
  406. body:
  407. $ref: '#/components/schemas/aliyun.Oss'
  408. card.OssUploadRequest:
  409. type: object
  410. properties: {}
  411. card.SaveCardInfoRequest:
  412. type: object
  413. properties:
  414. cardId:
  415. type: integer
  416. format: uint32
  417. card:
  418. $ref: '#/components/schemas/common.CardBaseBody'
  419. supplements:
  420. type: array
  421. items:
  422. $ref: '#/components/schemas/common.CardSupplementBaseBody'
  423. card.SaveCardReply:
  424. type: object
  425. properties:
  426. ok:
  427. type: boolean
  428. card.SearchCardReply:
  429. type: object
  430. properties:
  431. cards:
  432. type: array
  433. items:
  434. $ref: '#/components/schemas/common.CardBody'
  435. supplements:
  436. type: array
  437. items:
  438. $ref: '#/components/schemas/common.CardSupplementBaseBody'
  439. total:
  440. type: integer
  441. format: uint32
  442. card.SearchCardRequest:
  443. type: object
  444. properties:
  445. filter:
  446. $ref: '#/components/schemas/common.CardFilterBody'
  447. page:
  448. $ref: '#/components/schemas/pagination.PaginationBody'
  449. card.WxRegisterLoginReply:
  450. type: object
  451. properties:
  452. token:
  453. type: string
  454. card.WxRegisterLoginRequest:
  455. type: object
  456. properties:
  457. code:
  458. type: string
  459. common.CardBaseBody:
  460. type: object
  461. properties:
  462. name:
  463. type: string
  464. title:
  465. type: string
  466. companyName:
  467. type: string
  468. companyShortName:
  469. type: string
  470. templateId:
  471. type: integer
  472. format: uint32
  473. userId:
  474. type: integer
  475. format: uint32
  476. status:
  477. type: integer
  478. format: enum
  479. searchKey:
  480. type: string
  481. type:
  482. type: integer
  483. format: enum
  484. created:
  485. type: integer
  486. format: uint64
  487. common.CardBody:
  488. type: object
  489. properties:
  490. id:
  491. type: integer
  492. format: uint32
  493. body:
  494. $ref: '#/components/schemas/common.CardBaseBody'
  495. common.CardFilterBody:
  496. type: object
  497. properties:
  498. name:
  499. type: string
  500. title:
  501. type: string
  502. companyName:
  503. type: string
  504. companyShortName:
  505. type: string
  506. searchKey:
  507. type: string
  508. userId:
  509. type: integer
  510. format: uint32
  511. type:
  512. type: integer
  513. format: enum
  514. status:
  515. type: integer
  516. format: enum
  517. common.CardSupplementBaseBody:
  518. type: object
  519. properties:
  520. cardId:
  521. type: integer
  522. format: uint32
  523. keyName:
  524. type: string
  525. keyValue:
  526. type: string
  527. common.CardTemplateBaseBody:
  528. type: object
  529. properties:
  530. name:
  531. type: string
  532. titleColor:
  533. type: string
  534. subtitleColor:
  535. type: string
  536. contactColor:
  537. type: string
  538. backgroundImg:
  539. type: string
  540. common.CardTemplateBody:
  541. type: object
  542. properties:
  543. id:
  544. type: integer
  545. format: uint32
  546. body:
  547. $ref: '#/components/schemas/common.CardTemplateBaseBody'
  548. pagination.PaginationBody:
  549. type: object
  550. properties:
  551. now:
  552. type: integer
  553. format: uint32
  554. size:
  555. type: integer
  556. format: uint32
  557. user.AccountBaseBody:
  558. type: object
  559. properties:
  560. userId:
  561. type: integer
  562. format: uint32
  563. type:
  564. type: integer
  565. format: enum
  566. account:
  567. type: string
  568. password:
  569. type: string
  570. status:
  571. type: integer
  572. format: enum
  573. tags:
  574. - name: Card