From d65ac93a8f612cccec3cb3e2c7e77d8f59341edf Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:41:21 +0100 Subject: [PATCH] fix: ruby --- templates/ruby/lib/container/client.rb.twig | 15 ++++++--------- tests/Ruby27Test.php | 1 + 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/templates/ruby/lib/container/client.rb.twig b/templates/ruby/lib/container/client.rb.twig index 8df886ab7..05a4f0b32 100644 --- a/templates/ruby/lib/container/client.rb.twig +++ b/templates/ruby/lib/container/client.rb.twig @@ -16,22 +16,20 @@ module {{ spec.title | caseUcfirst }} 'x-sdk-platform'=> '{{ sdk.platform }}', 'x-sdk-language'=> '{{ language.name | caseLower }}', 'x-sdk-version'=> '{{ sdk.version }}'{% if spec.global.defaultHeaders | length > 0 %},{% endif %} - -{% for key,header in spec.global.defaultHeaders %} + {%~ for key,header in spec.global.defaultHeaders %} '{{key}}' => '{{header}}'{% if not loop.last %},{% endif %} -{% endfor %} - + {%~ endfor %} } @endpoint = '{{spec.endpoint}}' end -{% for header in spec.global.headers %} + {%~ for header in spec.global.headers %} # Set {{header.key | caseUcfirst}} # -{% if header.description %} + {%~ if header.description %} # {{header.description}} # -{% endif %} + {%- endif %} # @param [String] value The value to set for the {{ header.key }} header # # @return [self] @@ -41,7 +39,7 @@ module {{ spec.title | caseUcfirst }} self end -{% endfor %} + {%~ endfor %} # Set endpoint. # # @param [String] endpoint The endpoint to set @@ -64,7 +62,6 @@ module {{ spec.title | caseUcfirst }} self end - # Add Header # # @param [String] key The key for the header to add diff --git a/tests/Ruby27Test.php b/tests/Ruby27Test.php index 7c95ae9c2..dfedc48cf 100644 --- a/tests/Ruby27Test.php +++ b/tests/Ruby27Test.php @@ -26,6 +26,7 @@ class Ruby27Test extends Base ...Base::EXCEPTION_RESPONSES, ...Base::OAUTH_RESPONSES, ...Base::MULTIPART_RESPONSES, + ...Base::MULTIPART_RESPONSE_FILE, ...Base::QUERY_HELPER_RESPONSES, ...Base::PERMISSION_HELPER_RESPONSES, ...Base::ID_HELPER_RESPONSES