v2-transfer.yaml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-transfer.yaml
  2. get:
  3. summary: '列出 transfer'
  4. tags:
  5. - transfer
  6. operationId: get_api_v2_transfer
  7. description: 实现:`TransferController@index`
  8. parameters:
  9. -
  10. name: view
  11. in: query
  12. schema:
  13. type: string
  14. enum:
  15. - studio
  16. -
  17. name: name
  18. in: query
  19. schema:
  20. type: string
  21. -
  22. name: view2
  23. in: query
  24. schema:
  25. type: string
  26. enum:
  27. - in
  28. - out
  29. -
  30. name: order
  31. in: query
  32. schema:
  33. type: string
  34. default: updated_at
  35. -
  36. name: dir
  37. in: query
  38. schema:
  39. type: string
  40. default: desc
  41. -
  42. name: offset
  43. in: query
  44. schema:
  45. type: string
  46. -
  47. name: limit
  48. in: query
  49. schema:
  50. type: string
  51. -
  52. name: search
  53. in: query
  54. description: 搜索关键字
  55. schema:
  56. type: string
  57. responses:
  58. 200:
  59. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  60. content:
  61. application/json:
  62. schema:
  63. type: object
  64. properties:
  65. ok:
  66. type: boolean
  67. message:
  68. type: string
  69. data:
  70. type: object
  71. properties:
  72. rows:
  73. type: array
  74. items:
  75. type: object
  76. properties: { id: { type: integer }, origin_owner: { type: string }, res_type: { type: string }, res_id: { type: integer }, transferor: { type: string }, new_owner: { type: string }, status: { type: integer }, updated_at: { type: string }, created_at: { type: string }, editor: { type: string }, channel: { type: string } }
  77. count:
  78. type: integer
  79. 401:
  80. $ref: '../../main.yaml#/components/responses/Unauthorized'
  81. 422:
  82. $ref: '../../main.yaml#/components/responses/ValidationError'
  83. post:
  84. summary: '新建 transfer'
  85. tags:
  86. - transfer
  87. operationId: post_api_v2_transfer
  88. description: 实现:`TransferController@store`
  89. requestBody:
  90. required: false
  91. content:
  92. application/json:
  93. schema:
  94. type: object
  95. properties:
  96. res_id:
  97. type: string
  98. res_type:
  99. type: string
  100. enum:
  101. - channel
  102. - article
  103. new_owner:
  104. type: string
  105. responses:
  106. 200:
  107. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  108. content:
  109. application/json:
  110. schema:
  111. type: object
  112. properties:
  113. ok:
  114. type: boolean
  115. message:
  116. type: string
  117. data:
  118. type: object
  119. 401:
  120. $ref: '../../main.yaml#/components/responses/Unauthorized'
  121. 422:
  122. $ref: '../../main.yaml#/components/responses/ValidationError'