v2-wbw-sentence.yaml 2.9 KB

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