v2-chapter-index.yaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-chapter-index.yaml
  2. get:
  3. summary: '列出 chapter-index'
  4. tags:
  5. - chapter-index
  6. operationId: get_api_v2_chapter_index
  7. description: 实现:`ChapterIndexController@index`
  8. parameters:
  9. -
  10. name: view
  11. in: query
  12. schema:
  13. type: string
  14. enum:
  15. - public
  16. -
  17. name: updated_at
  18. in: query
  19. schema:
  20. type: string
  21. -
  22. name: created_at
  23. in: query
  24. schema:
  25. type: string
  26. -
  27. name: order
  28. in: query
  29. schema:
  30. type: string
  31. default: created_at
  32. -
  33. name: dir
  34. in: query
  35. schema:
  36. type: string
  37. default: desc
  38. -
  39. name: offset
  40. in: query
  41. schema:
  42. type: string
  43. -
  44. name: limit
  45. in: query
  46. schema:
  47. type: string
  48. -
  49. name: search
  50. in: query
  51. description: 搜索关键字
  52. schema:
  53. type: string
  54. responses:
  55. 200:
  56. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  57. content:
  58. application/json:
  59. schema:
  60. type: object
  61. properties:
  62. ok:
  63. type: boolean
  64. message:
  65. type: string
  66. data:
  67. type: object
  68. properties:
  69. rows:
  70. type: array
  71. items:
  72. type: object
  73. count:
  74. type: integer
  75. 401:
  76. $ref: '../../main.yaml#/components/responses/Unauthorized'
  77. 422:
  78. $ref: '../../main.yaml#/components/responses/ValidationError'
  79. post:
  80. summary: '新建 chapter-index'
  81. tags:
  82. - chapter-index
  83. operationId: post_api_v2_chapter_index
  84. description: 实现:`ChapterIndexController@store`
  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. 401:
  100. $ref: '../../main.yaml#/components/responses/Unauthorized'
  101. 422:
  102. $ref: '../../main.yaml#/components/responses/ValidationError'