Skip to content

Commit

Permalink
(#CALM-34513) Add empty dict to request body when body is null in POS…
Browse files Browse the repository at this point in the history
…T and PUT calls during Blueprint decompile (#202)

(cherry picked from commit 29b9a935a7908792918cb3dec4392d6de8ea0da7)
  • Loading branch information
yedhutilak authored and abhijeetkaurav1st committed Mar 6, 2023
1 parent 3154ecb commit aaacb8c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions calm/dsl/decompile/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ def render_task_template(
user_attrs["response_paths"] = attrs.get("response_paths", {})
method = attrs["method"]

if (method == "POST" or method == "PUT") and not cls.attrs["request_body"]:
cls.attrs["request_body"] = {}

if method == "GET":
schema_file = "task_http_get.py.jinja2"

Expand Down

0 comments on commit aaacb8c

Please sign in to comment.