v2-related-paragraph.yaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-related-paragraph.yaml
  2. get:
  3. summary: '列出 related-paragraph'
  4. tags:
  5. - related-paragraph
  6. operationId: get_api_v2_related_paragraph
  7. description: 实现:`RelatedParagraphController@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. properties: { book: { type: string }, para: { type: string }, book_title_pali: { type: string }, cs6_para: { type: string }, tags: { type: string }, path: { type: string } }
  72. count:
  73. type: integer
  74. 401:
  75. $ref: '../../main.yaml#/components/responses/Unauthorized'
  76. 422:
  77. $ref: '../../main.yaml#/components/responses/ValidationError'
  78. post:
  79. summary: '新建 related-paragraph'
  80. tags:
  81. - related-paragraph
  82. operationId: post_api_v2_related_paragraph
  83. description: 实现:`RelatedParagraphController@store`
  84. responses:
  85. 200:
  86. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  87. content:
  88. application/json:
  89. schema:
  90. type: object
  91. properties:
  92. ok:
  93. type: boolean
  94. message:
  95. type: string
  96. data:
  97. type: object
  98. 401:
  99. $ref: '../../main.yaml#/components/responses/Unauthorized'
  100. 422:
  101. $ref: '../../main.yaml#/components/responses/ValidationError'