outline-api.yaml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. openapi: 3.0.3
  2. info:
  3. title: Financial Report Generation - Outline API
  4. version: 1.0.0
  5. description: 大纲管理API
  6. servers:
  7. - url: http://localhost:8080/api/v1
  8. description: 本地开发环境
  9. - url: https://api.finrep.example.com/api/v1
  10. description: 生产环境
  11. tags:
  12. - name: Outline
  13. description: 大纲管理
  14. paths:
  15. /tasks/{taskId}/outline:
  16. get:
  17. summary: 查询任务大纲
  18. tags:
  19. - Outline
  20. parameters:
  21. - name: taskId
  22. in: path
  23. required: true
  24. schema:
  25. type: string
  26. - name: tenantId
  27. in: header
  28. required: true
  29. schema:
  30. type: string
  31. - name: type
  32. in: query
  33. schema:
  34. type: string
  35. enum: [LEVEL1, LEVEL2]
  36. responses:
  37. '200':
  38. description: 成功
  39. content:
  40. application/json:
  41. schema:
  42. $ref: '#/components/schemas/OutlineResponse'
  43. post:
  44. summary: 创建大纲
  45. tags:
  46. - Outline
  47. parameters:
  48. - name: taskId
  49. in: path
  50. required: true
  51. schema:
  52. type: string
  53. - name: tenantId
  54. in: header
  55. required: true
  56. schema:
  57. type: string
  58. requestBody:
  59. required: true
  60. content:
  61. application/json:
  62. schema:
  63. $ref: '#/components/schemas/OutlineRequest'
  64. responses:
  65. '200':
  66. description: 成功
  67. content:
  68. application/json:
  69. schema:
  70. $ref: '#/components/schemas/OutlineResponse'
  71. /outline/{outlineId}:
  72. get:
  73. summary: 查询大纲详情
  74. tags:
  75. - Outline
  76. parameters:
  77. - name: outlineId
  78. in: path
  79. required: true
  80. schema:
  81. type: string
  82. - name: tenantId
  83. in: header
  84. required: true
  85. schema:
  86. type: string
  87. responses:
  88. '200':
  89. description: 成功
  90. content:
  91. application/json:
  92. schema:
  93. $ref: '#/components/schemas/OutlineResponse'
  94. put:
  95. summary: 更新大纲
  96. tags:
  97. - Outline
  98. parameters:
  99. - name: outlineId
  100. in: path
  101. required: true
  102. schema:
  103. type: string
  104. - name: tenantId
  105. in: header
  106. required: true
  107. schema:
  108. type: string
  109. requestBody:
  110. required: true
  111. content:
  112. application/json:
  113. schema:
  114. $ref: '#/components/schemas/OutlineRequest'
  115. responses:
  116. '200':
  117. description: 成功
  118. /outline/{outlineId}/confirm:
  119. post:
  120. summary: 确认大纲
  121. tags:
  122. - Outline
  123. parameters:
  124. - name: outlineId
  125. in: path
  126. required: true
  127. schema:
  128. type: string
  129. - name: tenantId
  130. in: header
  131. required: true
  132. schema:
  133. type: string
  134. requestBody:
  135. required: true
  136. content:
  137. application/json:
  138. schema:
  139. type: object
  140. properties:
  141. confirmerId:
  142. type: string
  143. description: 确认人ID
  144. confirmerName:
  145. type: string
  146. description: 确认人名称
  147. responses:
  148. '200':
  149. description: 成功
  150. components:
  151. schemas:
  152. OutlineRequest:
  153. type: object
  154. required:
  155. - title
  156. - type
  157. properties:
  158. title:
  159. type: string
  160. description: 大纲标题
  161. maxLength: 255
  162. type:
  163. type: string
  164. description: 大纲类型
  165. enum: [LEVEL1, LEVEL2]
  166. rootNode:
  167. $ref: '#/components/schemas/OutlineNode'
  168. sections:
  169. type: array
  170. items:
  171. $ref: '#/components/schemas/OutlineSection'
  172. knowledgeUnitIds:
  173. type: array
  174. items:
  175. type: string
  176. description: 知识单元ID列表
  177. OutlineResponse:
  178. type: object
  179. properties:
  180. outlineId:
  181. type: string
  182. description: 大纲ID
  183. taskId:
  184. type: string
  185. description: 任务ID
  186. tenantId:
  187. type: string
  188. description: 租户ID
  189. title:
  190. type: string
  191. description: 大纲标题
  192. type:
  193. type: string
  194. description: 大纲类型
  195. rootNode:
  196. $ref: '#/components/schemas/OutlineNode'
  197. sections:
  198. type: array
  199. items:
  200. $ref: '#/components/schemas/OutlineSection'
  201. knowledgeUnitIds:
  202. type: array
  203. items:
  204. type: string
  205. confirmed:
  206. type: boolean
  207. description: 确认状态
  208. confirmerId:
  209. type: string
  210. description: 确认人ID
  211. confirmerName:
  212. type: string
  213. description: 确认人名称
  214. confirmTime:
  215. type: string
  216. format: date-time
  217. description: 确认时间
  218. createTime:
  219. type: string
  220. format: date-time
  221. description: 创建时间
  222. updateTime:
  223. type: string
  224. format: date-time
  225. description: 更新时间
  226. OutlineNode:
  227. type: object
  228. properties:
  229. nodeId:
  230. type: string
  231. description: 节点ID
  232. chapterNumber:
  233. type: string
  234. description: 章节编号
  235. title:
  236. type: string
  237. description: 章节标题
  238. description:
  239. type: string
  240. description: 章节描述
  241. parentId:
  242. type: string
  243. description: 父节点ID
  244. children:
  245. type: array
  246. items:
  247. $ref: '#/components/schemas/OutlineNode'
  248. level:
  249. type: integer
  250. description: 节点层级
  251. knowledgeUnitId:
  252. type: string
  253. description: 知识单元ID
  254. dataBinding:
  255. type: object
  256. description: 数据绑定配置
  257. sortOrder:
  258. type: integer
  259. description: 排序号
  260. OutlineSection:
  261. type: object
  262. properties:
  263. sectionId:
  264. type: string
  265. description: 章节ID
  266. sectionCode:
  267. type: string
  268. description: 章节编码
  269. sectionName:
  270. type: string
  271. description: 章节名称
  272. sectionType:
  273. type: string
  274. description: 章节类型
  275. description:
  276. type: string
  277. description: 描述
  278. knowledgeUnitId:
  279. type: string
  280. description: 知识单元ID
  281. dataBinding:
  282. type: object
  283. description: 数据绑定配置
  284. sortOrder:
  285. type: integer
  286. description: 排序号