v2-sentences-in-chapter.yaml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-sentences-in-chapter.yaml
  2. get:
  3. summary: '列出 sentences-in-chapter'
  4. tags:
  5. - sentences-in-chapter
  6. operationId: get_api_v2_sentences_in_chapter
  7. description: 实现:`SentencesInChapterController@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: search
  21. in: query
  22. description: 搜索关键字
  23. schema:
  24. type: string
  25. -
  26. name: order
  27. in: query
  28. description: 排序字段
  29. schema:
  30. type: string
  31. -
  32. name: dir
  33. in: query
  34. description: 排序方向
  35. schema:
  36. type: string
  37. enum:
  38. - desc
  39. - asc
  40. -
  41. name: limit
  42. in: query
  43. description: 每页记录数
  44. schema:
  45. type: number
  46. -
  47. name: offset
  48. in: query
  49. description: 从第几条记录开始提取
  50. schema:
  51. type: number
  52. responses:
  53. 200:
  54. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  55. content:
  56. application/json:
  57. schema:
  58. type: object
  59. properties:
  60. ok:
  61. type: boolean
  62. message:
  63. type: string
  64. data:
  65. type: object
  66. properties:
  67. rows:
  68. type: array
  69. items:
  70. type: object
  71. count:
  72. type: integer
  73. 401:
  74. $ref: '../../main.yaml#/components/responses/Unauthorized'
  75. 422:
  76. $ref: '../../main.yaml#/components/responses/ValidationError'
  77. post:
  78. summary: '新建 sentences-in-chapter'
  79. tags:
  80. - sentences-in-chapter
  81. operationId: post_api_v2_sentences_in_chapter
  82. description: 实现:`SentencesInChapterController@store`
  83. responses:
  84. 200:
  85. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  86. content:
  87. application/json:
  88. schema:
  89. type: object
  90. properties:
  91. ok:
  92. type: boolean
  93. message:
  94. type: string
  95. data:
  96. type: object
  97. 401:
  98. $ref: '../../main.yaml#/components/responses/Unauthorized'
  99. 422:
  100. $ref: '../../main.yaml#/components/responses/ValidationError'