(paths: Record<string, unknown>)
| 109 | } |
| 110 | |
| 111 | function patchFileDownload(paths: Record<string, unknown>): void { |
| 112 | const operation = getOperation(paths, '/api/v1/files/{file_id}', 'get'); |
| 113 | if (operation === undefined) return; |
| 114 | |
| 115 | setResponse(operation, '200', { |
| 116 | description: 'Binary file download', |
| 117 | headers: { |
| 118 | 'content-disposition': headerString(), |
| 119 | 'content-length': headerInteger(), |
| 120 | etag: headerString(), |
| 121 | }, |
| 122 | content: { |
| 123 | 'application/octet-stream': { |
| 124 | schema: binarySchema, |
| 125 | }, |
| 126 | }, |
| 127 | }); |
| 128 | setResponse(operation, '404', { |
| 129 | description: 'File not found', |
| 130 | content: jsonContent(errorEnvelopeSchema), |
| 131 | }); |
| 132 | } |
| 133 | |
| 134 | function patchSessionActions(paths: Record<string, unknown>): void { |
| 135 | const internalPath = '/api/v1/sessions/{tail}'; |
no test coverage detected