v2-nav-page.yaml 2.3 KB

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