Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
490 changes: 476 additions & 14 deletions docs/protocols/http_client.md

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion src/codegen/generators/typescript/channels/asyncapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ import {generateKafkaChannels} from './protocols/kafka';
import {generateMqttChannels} from './protocols/mqtt';
import {generateAmqpChannels} from './protocols/amqp';
import {generateEventSourceChannels} from './protocols/eventsource';
import {generatehttpChannels} from './protocols/http';
import {
generatehttpChannels,
resetHttpCommonTypesState
} from './protocols/http';
import {generateWebSocketChannels} from './protocols/websocket';

type Action = 'send' | 'receive' | 'subscribe' | 'publish';
Expand Down Expand Up @@ -85,6 +88,11 @@ export async function generateTypeScriptChannelsForAsyncAPI(
>,
protocolDependencies: Record<string, string[]>
): Promise<void> {
// Reset protocol-specific state at the start of each generation cycle
if (protocolsToUse.includes('http_client')) {
resetHttpCommonTypesState();
}

const {asyncapiDocument} = validateAsyncapiContext(context);
const channels = asyncapiDocument!
.allChannels()
Expand Down
Loading