v2-sentence-io.yaml 2.5 KB

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