Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-45917: Enable asyncapi documentation for ook #161

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
3 changes: 3 additions & 0 deletions changelog.d/20240822_185836_jsick_DM_45917.md
Original file line number Diff line number Diff line change
@@ -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`.
2 changes: 1 addition & 1 deletion src/ook/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
4 changes: 3 additions & 1 deletion src/ook/kafkarouter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Loading