responses.yaml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. HealthSuccess:
  2. description: DMS服务正常
  3. headers:
  4. X-Request-Id:
  5. description: 与响应体requestId相同
  6. schema:
  7. type: string
  8. format: uuid
  9. content:
  10. application/json:
  11. schema:
  12. $ref: './schemas.yaml#/HealthResponse'
  13. InternalError:
  14. description: 未处理的服务器错误
  15. headers:
  16. X-Request-Id:
  17. description: 与响应体requestId相同
  18. schema:
  19. type: string
  20. format: uuid
  21. content:
  22. application/json:
  23. schema:
  24. $ref: './schemas.yaml#/ErrorResponse'
  25. InvalidArgument:
  26. description: 请求参数错误
  27. content:
  28. application/json:
  29. schema:
  30. $ref: './schemas.yaml#/ErrorResponse'
  31. AuthenticationError:
  32. description: 认证失败、Token过期、用户禁用或认证版本失效
  33. content:
  34. application/json:
  35. schema:
  36. $ref: './schemas.yaml#/ErrorResponse'
  37. Forbidden:
  38. description: 当前用户无权执行该操作
  39. content:
  40. application/json:
  41. schema:
  42. $ref: './schemas.yaml#/ErrorResponse'
  43. NotFound:
  44. description: 分类不存在或已逻辑删除
  45. content:
  46. application/json:
  47. schema:
  48. $ref: './schemas.yaml#/ErrorResponse'
  49. Conflict:
  50. description: 数据版本冲突、方案名称冲突、分类编码重复或分类仍被占用
  51. content:
  52. application/json:
  53. schema:
  54. $ref: './schemas.yaml#/ErrorResponse'
  55. PayloadTooLarge:
  56. description: 单文件、批量数量或请求总大小超过限制
  57. content:
  58. application/json:
  59. schema:
  60. $ref: './schemas.yaml#/ErrorResponse'
  61. UnsupportedMedia:
  62. description: 文件类型不支持、文件结构损坏或Office不可预览
  63. content:
  64. application/json:
  65. schema:
  66. $ref: './schemas.yaml#/ErrorResponse'
  67. PreviewConverterUnavailable:
  68. description: 预览转换器不可用
  69. content:
  70. application/json:
  71. schema: {$ref: './schemas.yaml#/ErrorResponse'}
  72. example:
  73. code: PREVIEW_CONVERTER_UNAVAILABLE
  74. message: 预览转换器未配置或LibreOffice不可用
  75. details: null
  76. requestId: 00000000-0000-0000-0000-000000000000
  77. PreviewConversionTimeout:
  78. description: 预览转换超时
  79. content:
  80. application/json:
  81. schema: {$ref: './schemas.yaml#/ErrorResponse'}
  82. example:
  83. code: PREVIEW_CONVERSION_TIMEOUT
  84. message: 文档转换超时,请稍后重试
  85. details: null
  86. requestId: 00000000-0000-0000-0000-000000000000
  87. PreviewConversionFailed:
  88. description: 预览转换失败
  89. content:
  90. application/json:
  91. schema: {$ref: './schemas.yaml#/ErrorResponse'}
  92. example:
  93. code: PREVIEW_CONVERSION_FAILED
  94. message: 文档转换为PDF失败
  95. details: null
  96. requestId: 00000000-0000-0000-0000-000000000000
  97. BackupRunning:
  98. description: 已有备份任务正在运行(引擎单任务互斥)
  99. content:
  100. application/json:
  101. schema: {$ref: './schemas.yaml#/ErrorResponse'}
  102. example:
  103. code: BACKUP_RUNNING
  104. message: 已有备份任务正在运行,请等待完成后再试
  105. details: null
  106. requestId: 00000000-0000-0000-0000-000000000000
  107. BackupTargetUnavailable:
  108. description: 备份目标不可达或不可写
  109. content:
  110. application/json:
  111. schema: {$ref: './schemas.yaml#/ErrorResponse'}
  112. example:
  113. code: BACKUP_TARGET_UNAVAILABLE
  114. message: 备份目标不可达或不可写
  115. details: null
  116. requestId: 00000000-0000-0000-0000-000000000000
  117. BackupToolMissing:
  118. description: 备份所需外部工具不可用(rsync等)
  119. content:
  120. application/json:
  121. schema: {$ref: './schemas.yaml#/ErrorResponse'}
  122. example:
  123. code: BACKUP_TOOL_MISSING
  124. message: 备份所需外部工具不可用
  125. details: null
  126. requestId: 00000000-0000-0000-0000-000000000000
  127. BackupFailed:
  128. description: 备份执行失败(详见服务端日志与进度快照error字段)
  129. content:
  130. application/json:
  131. schema: {$ref: './schemas.yaml#/ErrorResponse'}
  132. example:
  133. code: BACKUP_FAILED
  134. message: 备份执行失败,请查看服务端日志
  135. details: null
  136. requestId: 00000000-0000-0000-0000-000000000000
  137. MetricUnavailable:
  138. description: 资源监控采集能力不可用(psutil 缺失或采样器未启动)
  139. content:
  140. application/json:
  141. schema: {$ref: './schemas.yaml#/ErrorResponse'}
  142. example:
  143. code: METRIC_UNAVAILABLE
  144. message: 资源监控采集能力不可用
  145. details: null
  146. requestId: 00000000-0000-0000-0000-000000000000