airtai / faststream

FastStream is a powerful and easy-to-use Python framework for building asynchronous services interacting with event streams such as Apache Kafka, RabbitMQ, NATS and Redis.
https://faststream.airt.ai/latest/
Apache License 2.0
3.18k stars 162 forks source link

Feature: AsyncAPI Kafka partitions support #1929

Closed Lancetnik closed 3 days ago

Lancetnik commented 5 days ago

Now, the following code

from faststream.specification import AsyncAPI
from faststream.kafka import KafkaBroker, TopicPartition

broker = KafkaBroker()

@broker.subscriber(partitions=[TopicPartition("test", 1)])
async def handler(): ...

docs = AsyncAPI(broker)

Just has no AsyncAPI representation

We should provides users with a correct schema in all subscriber options combinations, so