v2-palitext.yaml 2.8 KB

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