(endpoint: HttpApiEndpoint.Top)
| 1395 | } |
| 1396 | |
| 1397 | function getStreamSuccessSchemas(endpoint: HttpApiEndpoint.Top): Array<StreamSuccessSchema> { |
| 1398 | const schemas: Array<StreamSuccessSchema> = [] |
| 1399 | for (const schema of endpoint.success) { |
| 1400 | const body = HttpApiSchema.isWithHeaders(schema) ? schema.schema : schema |
| 1401 | if (HttpApiSchema.isStreamSchema(body)) { |
| 1402 | schemas.push(schema as StreamSuccessSchema) |
| 1403 | } |
| 1404 | } |
| 1405 | return schemas |
| 1406 | } |
| 1407 | |
| 1408 | function streamToResponse( |
| 1409 | successSchema: StreamSuccessSchema, |