v2-invite.yaml 2.6 KB

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