( document: Record<string, unknown>, )
| 79 | } as const; |
| 80 | |
| 81 | export function transformOpenApiDocument( |
| 82 | document: Record<string, unknown>, |
| 83 | ): Record<string, unknown> { |
| 84 | const paths = asRecord(document['paths']); |
| 85 | if (paths === undefined) return document; |
| 86 | |
| 87 | patchFileUpload(paths); |
| 88 | patchFileDownload(paths); |
| 89 | patchSessionActions(paths); |
| 90 | patchFsAction(paths); |
| 91 | patchFsDownload(paths); |
| 92 | patchQuestionResolveOrDismiss(paths); |
| 93 | |
| 94 | return document; |
| 95 | } |
| 96 | |
| 97 | function patchFileUpload(paths: Record<string, unknown>): void { |
| 98 | const operation = getOperation(paths, '/api/v1/files', 'post'); |
no test coverage detected