v2-book-title.yaml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-book-title.yaml
  2. get:
  3. summary: '列出 book-title'
  4. tags:
  5. - book-title
  6. operationId: get_api_v2_book_title
  7. description: 实现:`BookTitleController@index`
  8. parameters:
  9. -
  10. name: search
  11. in: query
  12. description: 搜索关键字
  13. schema:
  14. type: string
  15. -
  16. name: order
  17. in: query
  18. description: 排序字段
  19. schema:
  20. type: string
  21. -
  22. name: dir
  23. in: query
  24. description: 排序方向
  25. schema:
  26. type: string
  27. enum:
  28. - desc
  29. - asc
  30. -
  31. name: limit
  32. in: query
  33. description: 每页记录数
  34. schema:
  35. type: number
  36. -
  37. name: offset
  38. in: query
  39. description: 从第几条记录开始提取
  40. schema:
  41. type: number
  42. responses:
  43. 200:
  44. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  45. content:
  46. application/json:
  47. schema:
  48. type: object
  49. properties:
  50. ok:
  51. type: boolean
  52. message:
  53. type: string
  54. data:
  55. type: object
  56. properties:
  57. rows:
  58. type: array
  59. items:
  60. type: object
  61. properties: { book: { type: integer }, paragraph: { type: integer }, sn: { type: integer }, title: { type: string }, toc: { type: string, nullable: true }, tags: { type: array, items: { type: string } }, related_name: { type: string, nullable: true }, language: { type: string, nullable: true, description: 仅在部分查询口径下返回。 } }
  62. count:
  63. type: integer
  64. 401:
  65. $ref: '../../main.yaml#/components/responses/Unauthorized'
  66. 422:
  67. $ref: '../../main.yaml#/components/responses/ValidationError'
  68. post:
  69. summary: '新建 book-title'
  70. tags:
  71. - book-title
  72. operationId: post_api_v2_book_title
  73. description: 实现:`BookTitleController@store`
  74. responses:
  75. 200:
  76. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  77. content:
  78. application/json:
  79. schema:
  80. type: object
  81. properties:
  82. ok:
  83. type: boolean
  84. message:
  85. type: string
  86. data:
  87. type: object
  88. 401:
  89. $ref: '../../main.yaml#/components/responses/Unauthorized'
  90. 422:
  91. $ref: '../../main.yaml#/components/responses/ValidationError'