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. card.AddCardByShareTokenReply:
  263. type: object
  264. properties:
  265. ok:
  266. type: boolean
  267. card.AddCardByShareTokenRequest:
  268. type: object
  269. properties:
  270. token:
  271. type: string
  272. card.CreateAccountUserReply:
  273. type: object
  274. properties:
  275. ok:
  276. type: boolean
  277. card.CreateAccountUserRequest:
  278. type: object
  279. properties:
  280. account:
  281. $ref: '#/components/schemas/common.AccountBaseBody'
  282. card.CreateCardReply:
  283. type: object
  284. properties:
  285. id:
  286. type: integer
  287. format: uint32
  288. card.CreateCardRequest:
  289. type: object
  290. properties:
  291. card:
  292. $ref: '#/components/schemas/common.CardBaseBody'
  293. supplements:
  294. type: array
  295. items:
  296. $ref: '#/components/schemas/common.CardSupplementBaseBody'
  297. card.CreateShareTokenReply:
  298. type: object
  299. properties:
  300. token:
  301. type: string
  302. expire:
  303. type: string
  304. card.CreateShareTokenRequest:
  305. type: object
  306. properties:
  307. cardId:
  308. type: integer
  309. format: uint32
  310. card.DelCardInfoRequest:
  311. type: object
  312. properties:
  313. cardId:
  314. type: integer
  315. format: uint32
  316. card.DelCardReply:
  317. type: object
  318. properties:
  319. ok:
  320. type: boolean
  321. card.GetCardInfoReply:
  322. type: object
  323. properties:
  324. card:
  325. $ref: '#/components/schemas/common.CardBaseBody'
  326. supplements:
  327. type: array
  328. items:
  329. $ref: '#/components/schemas/common.CardSupplementBaseBody'
  330. template:
  331. $ref: '#/components/schemas/common.CardTemplateBaseBody'
  332. card.GetCardInfoRequest:
  333. type: object
  334. properties:
  335. cardId:
  336. type: integer
  337. format: uint32
  338. card.GetMyCardsReply:
  339. type: object
  340. properties:
  341. cards:
  342. type: array
  343. items:
  344. $ref: '#/components/schemas/common.CardBody'
  345. supplements:
  346. type: array
  347. items:
  348. $ref: '#/components/schemas/common.CardSupplementBaseBody'
  349. templates:
  350. type: array
  351. items:
  352. $ref: '#/components/schemas/common.CardTemplateBody'
  353. card.GetMyCardsRequest:
  354. type: object
  355. properties: {}
  356. card.GetTemplatesReply:
  357. type: object
  358. properties:
  359. templates:
  360. type: array
  361. items:
  362. $ref: '#/components/schemas/common.CardTemplateBody'
  363. card.GetTemplatesRequest:
  364. type: object
  365. properties: {}
  366. card.LoginAccountReply:
  367. type: object
  368. properties:
  369. token:
  370. type: string
  371. card.LoginAccountRequest:
  372. type: object
  373. properties:
  374. account:
  375. $ref: '#/components/schemas/common.AccountBaseBody'
  376. card.OCRCardReply:
  377. type: object
  378. properties:
  379. body:
  380. $ref: '#/components/schemas/common.CardBaseBody'
  381. supplements:
  382. type: array
  383. items:
  384. $ref: '#/components/schemas/common.CardSupplementBaseBody'
  385. card.OCRCardRequest:
  386. type: object
  387. properties:
  388. url:
  389. type: string
  390. card.OssUploadReplay:
  391. type: object
  392. properties:
  393. body:
  394. $ref: '#/components/schemas/common.Oss'
  395. card.OssUploadRequest:
  396. type: object
  397. properties: {}
  398. card.SaveCardInfoRequest:
  399. type: object
  400. properties:
  401. cardId:
  402. type: integer
  403. format: uint32
  404. card:
  405. $ref: '#/components/schemas/common.CardBaseBody'
  406. supplements:
  407. type: array
  408. items:
  409. $ref: '#/components/schemas/common.CardSupplementBaseBody'
  410. card.SaveCardReply:
  411. type: object
  412. properties:
  413. ok:
  414. type: boolean
  415. card.SearchCardReply:
  416. type: object
  417. properties:
  418. cards:
  419. type: array
  420. items:
  421. $ref: '#/components/schemas/common.CardBody'
  422. supplements:
  423. type: array
  424. items:
  425. $ref: '#/components/schemas/common.CardSupplementBaseBody'
  426. total:
  427. type: integer
  428. format: uint32
  429. card.SearchCardRequest:
  430. type: object
  431. properties:
  432. filter:
  433. $ref: '#/components/schemas/common.CardFilterBody'
  434. page:
  435. $ref: '#/components/schemas/pagination.PaginationBody'
  436. card.WxRegisterLoginReply:
  437. type: object
  438. properties:
  439. token:
  440. type: string
  441. card.WxRegisterLoginRequest:
  442. type: object
  443. properties:
  444. code:
  445. type: string
  446. common.AccountBaseBody:
  447. type: object
  448. properties:
  449. userId:
  450. type: integer
  451. format: uint32
  452. type:
  453. type: integer
  454. format: enum
  455. account:
  456. type: string
  457. password:
  458. type: string
  459. status:
  460. type: integer
  461. format: enum
  462. common.CardBaseBody:
  463. type: object
  464. properties:
  465. name:
  466. type: string
  467. title:
  468. type: string
  469. companyName:
  470. type: string
  471. companyShortName:
  472. type: string
  473. templateId:
  474. type: integer
  475. format: uint32
  476. userId:
  477. type: integer
  478. format: uint32
  479. status:
  480. type: integer
  481. format: enum
  482. searchKey:
  483. type: string
  484. type:
  485. type: integer
  486. format: enum
  487. created:
  488. type: integer
  489. format: uint64
  490. common.CardBody:
  491. type: object
  492. properties:
  493. id:
  494. type: integer
  495. format: uint32
  496. body:
  497. $ref: '#/components/schemas/common.CardBaseBody'
  498. common.CardFilterBody:
  499. type: object
  500. properties:
  501. name:
  502. type: string
  503. title:
  504. type: string
  505. companyName:
  506. type: string
  507. companyShortName:
  508. type: string
  509. searchKey:
  510. type: string
  511. userId:
  512. type: integer
  513. format: uint32
  514. type:
  515. type: integer
  516. format: enum
  517. status:
  518. type: integer
  519. format: enum
  520. common.CardSupplementBaseBody:
  521. type: object
  522. properties:
  523. cardId:
  524. type: integer
  525. format: uint32
  526. keyName:
  527. type: string
  528. keyValue:
  529. type: string
  530. common.CardTemplateBaseBody:
  531. type: object
  532. properties:
  533. name:
  534. type: string
  535. titleColor:
  536. type: string
  537. subtitleColor:
  538. type: string
  539. contactColor:
  540. type: string
  541. backgroundImg:
  542. type: string
  543. common.CardTemplateBody:
  544. type: object
  545. properties:
  546. id:
  547. type: integer
  548. format: uint32
  549. body:
  550. $ref: '#/components/schemas/common.CardTemplateBaseBody'
  551. common.Oss:
  552. type: object
  553. properties:
  554. AccessKeyId:
  555. type: string
  556. AccessKeySecret:
  557. type: string
  558. SecurityToken:
  559. type: string
  560. Region:
  561. type: string
  562. Bucket:
  563. type: string
  564. pagination.PaginationBody:
  565. type: object
  566. properties:
  567. now:
  568. type: integer
  569. format: uint32
  570. size:
  571. type: integer
  572. format: uint32
  573. tags:
  574. - name: Card