v2-chats-chat.yaml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-chats-chat.yaml
  2. get:
  3. summary: '获取单个 chats/{chat}'
  4. tags:
  5. - chats
  6. operationId: get_api_v2_chats_chat_
  7. description: 实现:`ChatController@show`
  8. parameters:
  9. -
  10. name: chat
  11. in: path
  12. required: true
  13. schema:
  14. type: string
  15. responses:
  16. 200:
  17. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  18. content:
  19. application/json:
  20. schema:
  21. type: object
  22. properties:
  23. ok:
  24. type: boolean
  25. message:
  26. type: string
  27. data:
  28. type: object
  29. properties:
  30. id:
  31. type: integer
  32. title:
  33. type: string
  34. user_id:
  35. type: integer
  36. created_at:
  37. type: string
  38. updated_at:
  39. type: string
  40. messages_count:
  41. type: integer
  42. 401:
  43. $ref: '../../main.yaml#/components/responses/Unauthorized'
  44. 422:
  45. $ref: '../../main.yaml#/components/responses/ValidationError'
  46. put:
  47. summary: '更新 chats/{chat}'
  48. tags:
  49. - chats
  50. operationId: put_api_v2_chats_chat_
  51. description: 实现:`ChatController@update`
  52. parameters:
  53. -
  54. name: chat
  55. in: path
  56. required: true
  57. schema:
  58. type: string
  59. responses:
  60. 200:
  61. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  62. content:
  63. application/json:
  64. schema:
  65. type: object
  66. properties:
  67. ok:
  68. type: boolean
  69. message:
  70. type: string
  71. data:
  72. type: object
  73. 401:
  74. $ref: '../../main.yaml#/components/responses/Unauthorized'
  75. 422:
  76. $ref: '../../main.yaml#/components/responses/ValidationError'
  77. patch:
  78. summary: '更新 chats/{chat}'
  79. tags:
  80. - chats
  81. operationId: patch_api_v2_chats_chat_
  82. description: 实现:`ChatController@update`
  83. parameters:
  84. -
  85. name: chat
  86. in: path
  87. required: true
  88. schema:
  89. type: string
  90. responses:
  91. 200:
  92. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  93. content:
  94. application/json:
  95. schema:
  96. type: object
  97. properties:
  98. ok:
  99. type: boolean
  100. message:
  101. type: string
  102. data:
  103. type: object
  104. 401:
  105. $ref: '../../main.yaml#/components/responses/Unauthorized'
  106. 422:
  107. $ref: '../../main.yaml#/components/responses/ValidationError'
  108. delete:
  109. summary: 单个软删除
  110. tags:
  111. - chats
  112. operationId: delete_api_v2_chats_chat_
  113. description: 实现:`ChatController@destroy`
  114. parameters:
  115. -
  116. name: chat
  117. in: path
  118. required: true
  119. schema:
  120. type: string
  121. responses:
  122. 200:
  123. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  124. content:
  125. application/json:
  126. schema:
  127. type: object
  128. properties:
  129. ok:
  130. type: boolean
  131. message:
  132. type: string
  133. data:
  134. type: object
  135. 401:
  136. $ref: '../../main.yaml#/components/responses/Unauthorized'
  137. 422:
  138. $ref: '../../main.yaml#/components/responses/ValidationError'