2
0

v2-anthology.yaml 3.5 KB

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