Generate a Kafka collection from an AsyncAPI specification
You can generate a Kafka collection directly from an AsyncAPI specification in Spec Hub. Brokers, topics, authentication structure, and example message payloads are populated automatically from the spec. Postman doesn’t support Schema Registry yet. You’ll still need to provide credentials and configure bounded-consume settings.
The collections you generate are unidirectional and changes you make in the generated collection don’t write back to the spec.
To generate a collection, open your AsyncAPI specification in Spec Hub and click Generate Collection.
What gets generated
Each request in the generated collection is a Kafka request. The following table shows where each part of the generated collection comes from.
Topics and requests
Producer or consumer
AsyncAPI 2.x and 3.x describe direction with different verbs.
- AsyncAPI 3.x uses
sendandreceivefrom the application’s point of view:sendmeans the generated request is a producer andreceivemeans the generated request is a consumer. - AsyncAPI 2.x uses
publishandsubscribefrom the application’s point of view:publishmeans the generated request is a producer andsubscribemeans the generated request is a consumer.
Messages
Consumer settings
Authentication
Generated auth comes from server.security(), or operation.security() when an operation overrides the server-level scheme. See How AsyncAPI security schemes map to Kafka auth types for the full mapping, noting that an AsyncAPI spec using the X509 security scheme doesn’t generate a Kafka auth type at all and maps to the connection’s TLS setting instead.
Postman never copies credential values out of your AsyncAPI spec. Even if a spec embeds them, credential fields on the generated request are always left empty. You’ll need to fill in your actual username, password, token, or certificate after generating the collection.
Schema
Generation itself doesn’t link a request to a schema. The one-click generator transforms the spec into a collection. It doesn’t know the id it will be given until after the collection is created and therefore can’t write a schema reference into the request at generation time.
Linking a topic or message to the spec itself is a manual step you can perform after generation, so Postman can validate it. You only need to pick the spec from the schema picker on the topic (for consume) or message (for produce). For more information, see Validate messages against a schema for that workflow and what validation actually checks today.