v2-api-api.yaml 3.7 KB

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