diff --git a/pyproject.toml b/pyproject.toml index e5793be..c818036 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "zen-generator" -version = "0.1.7" +version = "0.1.8" description = "A bidirectional Python code generator that converts between AsyncAPI 3.0 specifications and Python code (pure Python or FastAPI implementations)." authors = [{ name = "Carlo Bertini [WaYdotNET]", email = "waydotnet@gmail.com" }] readme = "README.md" diff --git a/zen_generator/generators/asyncapi.py b/zen_generator/generators/asyncapi.py index 6b15d7f..da407ba 100644 --- a/zen_generator/generators/asyncapi.py +++ b/zen_generator/generators/asyncapi.py @@ -53,7 +53,8 @@ def create_async_api_content( # components.operations components["operations"][func] = { "action": "receive", - "description": content.get("description", ""), + # The description is now sourced from the 'request' object for better clarity. + "description": content.get("request", {}).get("description", ""), "channel": {"$ref": f"#/channels/{func}"}, "messages": [{"$ref": f"#/channels/{func}/messages/request"}], "reply": {