v2-ai-assistant.yaml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-ai-assistant.yaml
  2. get:
  3. summary: '列出 ai-assistant'
  4. tags:
  5. - ai-assistant
  6. operationId: get_api_v2_ai_assistant
  7. description: 实现:`AiAssistantController@index`
  8. parameters:
  9. -
  10. name: keyword
  11. in: query
  12. schema:
  13. type: string
  14. -
  15. name: order
  16. in: query
  17. schema:
  18. type: string
  19. default: created_at
  20. -
  21. name: dir
  22. in: query
  23. schema:
  24. type: string
  25. default: asc
  26. -
  27. name: offset
  28. in: query
  29. schema:
  30. type: string
  31. -
  32. name: limit
  33. in: query
  34. schema:
  35. type: string
  36. -
  37. name: search
  38. in: query
  39. description: 搜索关键字
  40. schema:
  41. type: string
  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: { id: { type: integer }, userName: { type: string }, nickName: { type: string } }
  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: '新建 ai-assistant'
  70. tags:
  71. - ai-assistant
  72. operationId: post_api_v2_ai_assistant
  73. description: 实现:`AiAssistantController@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'