v2-paragraph-content.yaml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-paragraph-content.yaml
  2. get:
  3. summary: '列出 paragraph-content'
  4. tags:
  5. - paragraph-content
  6. operationId: get_api_v2_paragraph_content
  7. description: 实现:`ParagraphContentController@index`
  8. parameters:
  9. -
  10. name: channels
  11. in: query
  12. schema:
  13. type: string
  14. -
  15. name: mode
  16. in: query
  17. schema:
  18. type: string
  19. default: read
  20. -
  21. name: search
  22. in: query
  23. description: 搜索关键字
  24. schema:
  25. type: string
  26. -
  27. name: order
  28. in: query
  29. description: 排序字段
  30. schema:
  31. type: string
  32. -
  33. name: dir
  34. in: query
  35. description: 排序方向
  36. schema:
  37. type: string
  38. enum:
  39. - desc
  40. - asc
  41. -
  42. name: limit
  43. in: query
  44. description: 每页记录数
  45. schema:
  46. type: number
  47. -
  48. name: offset
  49. in: query
  50. description: 从第几条记录开始提取
  51. schema:
  52. type: number
  53. responses:
  54. 200:
  55. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  56. content:
  57. application/json:
  58. schema:
  59. type: object
  60. properties:
  61. ok:
  62. type: boolean
  63. message:
  64. type: string
  65. data:
  66. type: object
  67. properties:
  68. rows:
  69. type: array
  70. items:
  71. type: object
  72. count:
  73. type: integer
  74. 401:
  75. $ref: '../../main.yaml#/components/responses/Unauthorized'
  76. 422:
  77. $ref: '../../main.yaml#/components/responses/ValidationError'
  78. post:
  79. summary: '新建 paragraph-content'
  80. tags:
  81. - paragraph-content
  82. operationId: post_api_v2_paragraph_content
  83. description: 实现:`ParagraphContentController@store`
  84. responses:
  85. 200:
  86. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  87. content:
  88. application/json:
  89. schema:
  90. type: object
  91. properties:
  92. ok:
  93. type: boolean
  94. message:
  95. type: string
  96. data:
  97. type: object
  98. 401:
  99. $ref: '../../main.yaml#/components/responses/Unauthorized'
  100. 422:
  101. $ref: '../../main.yaml#/components/responses/ValidationError'