From dad09774045f3e1eb331daf337b077d2f0c73088 Mon Sep 17 00:00:00 2001 From: Carlo Bertini Date: Tue, 29 Apr 2025 22:43:47 +0200 Subject: [PATCH 1/3] fix: update operation description retrieval in create_async_api_content --- zen_generator/generators/asyncapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zen_generator/generators/asyncapi.py b/zen_generator/generators/asyncapi.py index 6b15d7f..8160904 100644 --- a/zen_generator/generators/asyncapi.py +++ b/zen_generator/generators/asyncapi.py @@ -53,7 +53,7 @@ def create_async_api_content( # components.operations components["operations"][func] = { "action": "receive", - "description": content.get("description", ""), + "description": content.get("request", {}).get("description", ""), "channel": {"$ref": f"#/channels/{func}"}, "messages": [{"$ref": f"#/channels/{func}/messages/request"}], "reply": { From 9d221f9e48744d718bf50fe3d5523febbfa05adb Mon Sep 17 00:00:00 2001 From: Carlo Bertini Date: Tue, 29 Apr 2025 22:43:58 +0200 Subject: [PATCH 2/3] fix: bump version to 0.1.8 in pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" From 870bc340afa8a90db4afc181e0cb217e4c11004d Mon Sep 17 00:00:00 2001 From: Carlo Bertini Date: Tue, 29 Apr 2025 22:48:05 +0200 Subject: [PATCH 3/3] fix: improve operation description retrieval in create_async_api_content --- zen_generator/generators/asyncapi.py | 1 + 1 file changed, 1 insertion(+) diff --git a/zen_generator/generators/asyncapi.py b/zen_generator/generators/asyncapi.py index 8160904..da407ba 100644 --- a/zen_generator/generators/asyncapi.py +++ b/zen_generator/generators/asyncapi.py @@ -53,6 +53,7 @@ def create_async_api_content( # components.operations components["operations"][func] = { "action": "receive", + # 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"}],