v2-snowflake.yaml 2.3 KB

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