2
0

v2-article-map.yaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-article-map.yaml
  2. get:
  3. summary: '列出 article-map'
  4. tags:
  5. - article-map
  6. operationId: get_api_v2_article_map
  7. description: 实现:`ArticleMapController@index`
  8. parameters:
  9. -
  10. name: view
  11. in: query
  12. schema:
  13. type: string
  14. enum:
  15. - anthology
  16. - article
  17. -
  18. name: id
  19. in: query
  20. schema:
  21. type: string
  22. -
  23. name: parent
  24. in: query
  25. schema:
  26. type: string
  27. -
  28. name: lazy
  29. in: query
  30. schema:
  31. type: string
  32. -
  33. name: search
  34. in: query
  35. description: 搜索关键字
  36. schema:
  37. type: string
  38. -
  39. name: order
  40. in: query
  41. description: 排序字段
  42. schema:
  43. type: string
  44. -
  45. name: dir
  46. in: query
  47. description: 排序方向
  48. schema:
  49. type: string
  50. enum:
  51. - desc
  52. - asc
  53. -
  54. name: limit
  55. in: query
  56. description: 每页记录数
  57. schema:
  58. type: number
  59. -
  60. name: offset
  61. in: query
  62. description: 从第几条记录开始提取
  63. schema:
  64. type: number
  65. responses:
  66. 200:
  67. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  68. content:
  69. application/json:
  70. schema:
  71. type: object
  72. properties:
  73. ok:
  74. type: boolean
  75. message:
  76. type: string
  77. data:
  78. type: object
  79. properties:
  80. rows:
  81. type: array
  82. items:
  83. type: object
  84. properties: { id: { type: integer }, collect_id: { type: integer }, article_id: { type: integer }, level: { type: integer }, title: { type: string }, editor: { type: string }, children: { type: string }, status: { type: integer }, deleted_at: { type: string }, created_at: { type: string }, updated_at: { type: string }, format: { type: string }, title_text: { type: string } }
  85. count:
  86. type: integer
  87. 401:
  88. $ref: '../../main.yaml#/components/responses/Unauthorized'
  89. 422:
  90. $ref: '../../main.yaml#/components/responses/ValidationError'
  91. post:
  92. summary: '新建 article-map'
  93. tags:
  94. - article-map
  95. operationId: post_api_v2_article_map
  96. description: 实现:`ArticleMapController@store`
  97. requestBody:
  98. required: true
  99. content:
  100. application/json:
  101. schema:
  102. type: object
  103. properties:
  104. anthology_id:
  105. type: string
  106. description: 规则:required
  107. operation:
  108. type: string
  109. description: 规则:required
  110. article_id:
  111. type: string
  112. required:
  113. - anthology_id
  114. - operation
  115. responses:
  116. 200:
  117. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  118. content:
  119. application/json:
  120. schema:
  121. type: object
  122. properties:
  123. ok:
  124. type: boolean
  125. message:
  126. type: string
  127. data:
  128. type: object
  129. 401:
  130. $ref: '../../main.yaml#/components/responses/Unauthorized'
  131. 422:
  132. $ref: '../../main.yaml#/components/responses/ValidationError'