Skip to content

Commit

Permalink
Fix template error that caused publish/request confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
WiZeYAR committed Jan 1, 2025
1 parent 77204bd commit 87eea0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "asyncapi-python"
version = "0.1.5"
version = "0.1.6"
license = "Apache-2.0"
description = "Easily generate type-safe and async Python applications from AsyncAPI 3 specifications."
authors = ["Yaroslav Petrov <yaroslav.v.petrov@gmail.com>"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Application(BaseApplication):

{% for op in ops if op.action == "send" -%}
{%- set in_type = "Union[" + (op.input_types | join(", ")) + "]" -%}
{%- set out_type = "Union[" + (op.output_types | join(", ") if op.output_types else "None") + "]" -%}
{%- set out_type = ("Union[" + op.output_types | join(", ") + "]") if op.output_types else "None" -%}
{%- set callback_type = "Callable[["+ in_type + "], Awaitable[" + out_type + "]" + "]" -%}
{%- set send_method = "publish" if out_type == "None" else "request" -%}
{%- set routing_key_literal = '"' + op.routing_key + '"' if op.routing_key else "None" -%}
Expand Down

0 comments on commit 87eea0f

Please sign in to comment.