v2-export.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-export.yaml
  2. get:
  3. summary: '列出 export'
  4. tags:
  5. - export
  6. operationId: get_api_v2_export
  7. description: 实现:`ExportController@index`
  8. parameters:
  9. -
  10. name: type
  11. in: query
  12. schema:
  13. type: string
  14. enum:
  15. - chapter
  16. - article
  17. default: chapter
  18. -
  19. name: book
  20. in: query
  21. schema:
  22. type: string
  23. -
  24. name: par
  25. in: query
  26. schema:
  27. type: string
  28. -
  29. name: channel
  30. in: query
  31. schema:
  32. type: string
  33. -
  34. name: format
  35. in: query
  36. schema:
  37. type: string
  38. -
  39. name: origin
  40. in: query
  41. schema:
  42. type: string
  43. -
  44. name: translation
  45. in: query
  46. schema:
  47. type: string
  48. -
  49. name: id
  50. in: query
  51. schema:
  52. type: string
  53. -
  54. name: anthology
  55. in: query
  56. schema:
  57. type: string
  58. -
  59. name: search
  60. in: query
  61. description: 搜索关键字
  62. schema:
  63. type: string
  64. -
  65. name: order
  66. in: query
  67. description: 排序字段
  68. schema:
  69. type: string
  70. -
  71. name: dir
  72. in: query
  73. description: 排序方向
  74. schema:
  75. type: string
  76. enum:
  77. - desc
  78. - asc
  79. -
  80. name: limit
  81. in: query
  82. description: 每页记录数
  83. schema:
  84. type: number
  85. -
  86. name: offset
  87. in: query
  88. description: 从第几条记录开始提取
  89. schema:
  90. type: number
  91. responses:
  92. 200:
  93. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  94. content:
  95. application/json:
  96. schema:
  97. type: object
  98. properties:
  99. ok:
  100. type: boolean
  101. message:
  102. type: string
  103. data:
  104. type: object
  105. properties:
  106. rows:
  107. type: array
  108. items:
  109. type: object
  110. count:
  111. type: integer
  112. 401:
  113. $ref: '../../main.yaml#/components/responses/Unauthorized'
  114. 422:
  115. $ref: '../../main.yaml#/components/responses/ValidationError'
  116. post:
  117. summary: '新建 export'
  118. tags:
  119. - export
  120. operationId: post_api_v2_export
  121. description: 实现:`ExportController@store`
  122. responses:
  123. 200:
  124. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  125. content:
  126. application/json:
  127. schema:
  128. type: object
  129. properties:
  130. ok:
  131. type: boolean
  132. message:
  133. type: string
  134. data:
  135. type: object
  136. 401:
  137. $ref: '../../main.yaml#/components/responses/Unauthorized'
  138. 422:
  139. $ref: '../../main.yaml#/components/responses/ValidationError'