v2-model-log.yaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-model-log.yaml
  2. get:
  3. summary: '列出 model-log'
  4. tags:
  5. - model-log
  6. operationId: get_api_v2_model_log
  7. description: 实现:`ModelLogController@index`
  8. parameters:
  9. -
  10. name: view
  11. in: query
  12. schema:
  13. type: string
  14. enum:
  15. - model
  16. -
  17. name: id
  18. in: query
  19. schema:
  20. type: string
  21. -
  22. name: search
  23. in: query
  24. schema:
  25. type: string
  26. -
  27. name: order
  28. in: query
  29. schema:
  30. type: string
  31. default: updated_at
  32. -
  33. name: dir
  34. in: query
  35. schema:
  36. type: string
  37. default: desc
  38. -
  39. name: offset
  40. in: query
  41. schema:
  42. type: string
  43. -
  44. name: limit
  45. in: query
  46. schema:
  47. type: string
  48. responses:
  49. 200:
  50. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  51. content:
  52. application/json:
  53. schema:
  54. type: object
  55. properties:
  56. ok:
  57. type: boolean
  58. message:
  59. type: string
  60. data:
  61. type: object
  62. properties:
  63. rows:
  64. type: array
  65. items:
  66. type: object
  67. count:
  68. type: integer
  69. 401:
  70. $ref: '../../main.yaml#/components/responses/Unauthorized'
  71. 422:
  72. $ref: '../../main.yaml#/components/responses/ValidationError'
  73. post:
  74. summary: '新建 model-log'
  75. tags:
  76. - model-log
  77. operationId: post_api_v2_model_log
  78. description: 实现:`ModelLogController@store`
  79. requestBody:
  80. required: false
  81. content:
  82. application/json:
  83. schema:
  84. type: object
  85. properties:
  86. model_id:
  87. type: string
  88. request_at:
  89. type: string
  90. request_headers:
  91. type: string
  92. request_data:
  93. type: string
  94. response_headers:
  95. type: string
  96. response_data:
  97. type: string
  98. status:
  99. type: string
  100. success:
  101. type: string
  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'