v3-glossaries-kind.yaml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-glossaries-kind.yaml
  2. get:
  3. summary: 术语词汇表
  4. tags:
  5. - glossaries
  6. operationId: get_api_v3_glossaries_kind_
  7. description: |-
  8. 整表返回、不分页(客户端启动时拉一次,本地查词)。`meta.lang` 是实际用到的语言:
  9. 该语言没有这张表时回退到英文。条目的 `id`(术语 guid)只有 grammar 表给,community 表不给(省流量)。
  10. community 表带 `ETag`(`Cache-Control: public, no-cache`):浏览器下次自动带 `If-None-Match`,
  11. 表没变就回 304、不带正文。ETag 在社区术语任务每次跑完时更换。grammar 表暂不带。
  12. 实现:`V3\GlossaryController@__invoke`
  13. security:
  14. - { }
  15. -
  16. bearerAuth: []
  17. parameters:
  18. -
  19. name: kind
  20. in: path
  21. required: true
  22. schema:
  23. type: string
  24. enum:
  25. - grammar
  26. - community
  27. description: '哪张表:grammar 语法术语,community 社区译名'
  28. -
  29. name: lang
  30. in: query
  31. schema:
  32. type: string
  33. description: '语言,如 zh-Hans。缺省用界面语言(Accept-Language 协商的结果)'
  34. responses:
  35. 200:
  36. description: 成功
  37. content:
  38. application/json:
  39. schema:
  40. type: object
  41. properties:
  42. data:
  43. type: array
  44. items:
  45. type: object
  46. properties:
  47. id:
  48. type: string
  49. description: 仅在部分查询口径下返回。
  50. word:
  51. type: string
  52. tag:
  53. type: string
  54. nullable: true
  55. meaning:
  56. type: string
  57. other_meaning:
  58. type: string
  59. nullable: true
  60. meta:
  61. type: object
  62. properties:
  63. kind:
  64. type: string
  65. description: 哪张表
  66. lang:
  67. type: string
  68. description: '实际用到的语言(没有该语言的表时是 en)'
  69. total:
  70. type: integer
  71. description: 条数
  72. 422:
  73. $ref: '../../main.yaml#/components/responses/ProblemValidation'