2
0

v2-group.yaml 2.8 KB

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