diff --git a/changelog.d/20240822_185836_jsick_DM_45917.md b/changelog.d/20240822_185836_jsick_DM_45917.md new file mode 100644 index 0000000..4d5c456 --- /dev/null +++ b/changelog.d/20240822_185836_jsick_DM_45917.md @@ -0,0 +1,3 @@ +### New features + +- Enable AsyncAPI documentation. Docs are available from the `/ook/asyncapi` endpoint, and the schema is available from `/ook/asyncapi/json`. diff --git a/src/ook/factory.py b/src/ook/factory.py index 38e78c6..cb0817e 100644 --- a/src/ook/factory.py +++ b/src/ook/factory.py @@ -64,7 +64,7 @@ async def create( http_client=http_client, kafka_broker=broker, kafka_ingest_publisher=broker.publisher( - config.ingest_kafka_topic, title="Ook ingest requests" + config.ingest_kafka_topic, description="Ook ingest requests" ), algolia_client=algolia_client, ) diff --git a/src/ook/kafkarouter.py b/src/ook/kafkarouter.py index d9f71db..b0057a2 100644 --- a/src/ook/kafkarouter.py +++ b/src/ook/kafkarouter.py @@ -15,5 +15,7 @@ kafka_security = BaseSecurity(ssl_context=config.kafka.ssl_context) kafka_router = KafkaRouter( - config.kafka.bootstrap_servers, security=kafka_security + config.kafka.bootstrap_servers, + security=kafka_security, + schema_url=f"{config.path_prefix}/asyncapi", )