Skip to content

Commit

Permalink
Merge pull request #566 from MetaCell/feature/563
Browse files Browse the repository at this point in the history
#563 fix: crashing openapi backend generator for route based params
  • Loading branch information
filippomc authored Sep 8, 2022
2 parents ca244e7 + df0a440 commit 27d7d72
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ def {{operation.function_name}}({{operation.snake_case_arguments}}) -> {{operati
return api_controller.{{operation.function_name}}(
{% endif %}
{% for params in operation.snake_case_arguments.split(",") -%}
{% if params %}{{params.split(":")[0]}}={{params.split(":")[0]}}{% if not loop.last %},{% endif %}{% endif %}
{% if params and ':' in params %}
{{params.split(":")[0]}}={{params.split(":")[0]}},
{% endfor -%})
{% endfor %}

Expand Down

0 comments on commit 27d7d72

Please sign in to comment.