v2-dict.yaml 2.4 KB

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