v2-sent-sim.yaml 2.7 KB

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