| 819 | } |
| 820 | |
| 821 | function addStreamContent( |
| 822 | stream: HttpApiSchema.StreamSchema, |
| 823 | status: number |
| 824 | ) { |
| 825 | const statusMap = map.get(status) |
| 826 | if (statusMap === undefined) { |
| 827 | map.set(status, { |
| 828 | descriptions: new Set(), |
| 829 | content: undefined, |
| 830 | headers: [], |
| 831 | streamContent: new Map([[stream.contentType, stream]]) |
| 832 | }) |
| 833 | } else { |
| 834 | if (statusMap.streamContent === undefined) { |
| 835 | statusMap.streamContent = new Map([[stream.contentType, stream]]) |
| 836 | } else { |
| 837 | statusMap.streamContent.set(stream.contentType, stream) |
| 838 | } |
| 839 | } |
| 840 | } |
| 841 | } |
| 842 | |
| 843 | function resolveDescriptionOrIdentifier(ast: SchemaAST.AST): string | undefined { |