v2-wbw-templates.yaml 2.7 KB

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