v2-nissaya-ending.yaml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-nissaya-ending.yaml
  2. get:
  3. summary: '列出 nissaya-ending'
  4. tags:
  5. - nissaya-ending
  6. operationId: get_api_v2_nissaya_ending
  7. description: 实现:`NissayaEndingController@index`
  8. parameters:
  9. -
  10. name: case
  11. in: query
  12. schema:
  13. type: string
  14. -
  15. name: lang
  16. in: query
  17. schema:
  18. type: string
  19. -
  20. name: relation
  21. in: query
  22. schema:
  23. type: string
  24. -
  25. name: search
  26. in: query
  27. schema:
  28. type: string
  29. -
  30. name: order
  31. in: query
  32. schema:
  33. type: string
  34. default: updated_at
  35. -
  36. name: dir
  37. in: query
  38. schema:
  39. type: string
  40. default: desc
  41. -
  42. name: offset
  43. in: query
  44. schema:
  45. type: string
  46. -
  47. name: limit
  48. in: query
  49. schema:
  50. type: string
  51. responses:
  52. 200:
  53. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  54. content:
  55. application/json:
  56. schema:
  57. type: object
  58. properties:
  59. ok:
  60. type: boolean
  61. message:
  62. type: string
  63. data:
  64. type: object
  65. properties:
  66. rows:
  67. type: array
  68. items:
  69. type: object
  70. properties: { id: { type: integer }, ending: { type: string }, lang: { type: string }, relation: { type: string }, case: { type: string }, from: { type: string }, count: { type: integer }, editor: { type: string }, created_at: { type: string }, updated_at: { type: string }, term_channel: { type: string }, term_id: { type: integer } }
  71. count:
  72. type: integer
  73. 401:
  74. $ref: '../../main.yaml#/components/responses/Unauthorized'
  75. 422:
  76. $ref: '../../main.yaml#/components/responses/ValidationError'
  77. post:
  78. summary: '新建 nissaya-ending'
  79. tags:
  80. - nissaya-ending
  81. operationId: post_api_v2_nissaya_ending
  82. description: 实现:`NissayaEndingController@store`
  83. requestBody:
  84. required: true
  85. content:
  86. application/json:
  87. schema:
  88. type: object
  89. properties:
  90. ending:
  91. type: string
  92. description: 规则:required
  93. lang:
  94. type: string
  95. description: 规则:required
  96. relation:
  97. type: string
  98. case:
  99. type: string
  100. from:
  101. type: string
  102. required:
  103. - ending
  104. - lang
  105. responses:
  106. 200:
  107. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  108. content:
  109. application/json:
  110. schema:
  111. type: object
  112. properties:
  113. ok:
  114. type: boolean
  115. message:
  116. type: string
  117. data:
  118. type: object
  119. properties:
  120. id:
  121. type: integer
  122. ending:
  123. type: string
  124. lang:
  125. type: string
  126. relation:
  127. type: string
  128. case:
  129. type: string
  130. from:
  131. type: string
  132. count:
  133. type: integer
  134. editor:
  135. type: string
  136. created_at:
  137. type: string
  138. updated_at:
  139. type: string
  140. term_channel:
  141. type: string
  142. term_id:
  143. type: integer
  144. 401:
  145. $ref: '../../main.yaml#/components/responses/Unauthorized'
  146. 422:
  147. $ref: '../../main.yaml#/components/responses/ValidationError'