v2-article-nav.yaml 2.4 KB

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