v3-terms.yaml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-terms.yaml
  2. get:
  3. summary: 按词查术语
  4. tags:
  5. - terms
  6. operationId: get_api_v3_terms
  7. description: |-
  8. 这些词在你看得见的 channel 与 studio 级术语里的词条(编辑时看同词的其它义项、社区译法)。
  9. 实现:`V3\TermController@index`
  10. security:
  11. - { }
  12. -
  13. bearerAuth: []
  14. parameters:
  15. -
  16. name: with_body
  17. in: query
  18. schema:
  19. type: boolean
  20. description: '每条都带渲染后的正文 `body`'
  21. -
  22. name: per_page
  23. in: query
  24. schema:
  25. type: integer
  26. default: 20
  27. description: '每页条数,最大 200'
  28. -
  29. name: word
  30. in: query
  31. schema:
  32. type: string
  33. description: '巴利词,逗号分隔,最多 50 个'
  34. required: true
  35. -
  36. name: tag
  37. in: query
  38. schema:
  39. type: string
  40. description: 义项;传空串只要没有义项的
  41. -
  42. name: channel
  43. in: query
  44. schema:
  45. type: string
  46. description: '只要这个 channel 的'
  47. -
  48. name: language
  49. in: query
  50. schema:
  51. type: string
  52. description: 只要这个语言的
  53. -
  54. name: page
  55. in: query
  56. schema:
  57. type: integer
  58. description: 页码
  59. responses:
  60. 200:
  61. description: 成功
  62. content:
  63. application/json:
  64. schema:
  65. type: object
  66. properties:
  67. data:
  68. type: array
  69. items:
  70. type: object
  71. properties:
  72. id:
  73. type: string
  74. word:
  75. type: string
  76. tag:
  77. type: string
  78. nullable: true
  79. meaning:
  80. type: string
  81. other_meaning:
  82. type: string
  83. nullable: true
  84. language:
  85. type: string
  86. channel_id:
  87. type: string
  88. nullable: true
  89. channel:
  90. type: object
  91. properties: { id: { type: string }, name: { type: string } }
  92. nullable: true
  93. owner_id:
  94. type: string
  95. quality:
  96. type: string
  97. nullable: true
  98. content_type:
  99. type: string
  100. summary:
  101. type: string
  102. nullable: true
  103. note:
  104. type: string
  105. nullable: true
  106. redirect:
  107. type: string
  108. nullable: true
  109. categories:
  110. type: array
  111. items: { type: string }
  112. summary_text:
  113. type: string
  114. body:
  115. type: array
  116. items: { $ref: '../../main.yaml#/components/schemas/MarkupNode' }
  117. description: 仅在部分查询口径下返回。
  118. html:
  119. type: string
  120. description: 仅在部分查询口径下返回。
  121. editor:
  122. type: object
  123. properties: { id: { type: string }, nickName: { type: string }, userName: { type: string }, realName: { type: string }, sn: { type: integer }, avatar: { type: string }, roles: { type: array, items: { type: string } } }
  124. nullable: true
  125. co_editor:
  126. type: object
  127. properties: { id: { type: string }, nickName: { type: string }, userName: { type: string }, realName: { type: string }, sn: { type: integer }, avatar: { type: string }, roles: { type: array, items: { type: string } } }
  128. nullable: true
  129. etag:
  130. type: string
  131. abilities:
  132. type: object
  133. properties: { update: { type: boolean }, delete: { type: boolean } }
  134. created_at:
  135. type: string
  136. updated_at:
  137. type: string
  138. deleted_at:
  139. type: string
  140. nullable: true
  141. meta:
  142. $ref: '../../main.yaml#/components/schemas/PaginationMeta'
  143. 422:
  144. $ref: '../../main.yaml#/components/responses/ProblemValidation'