diff --git a/Swift/blocks/method/method-declaration.twig b/Swift/blocks/method/method-declaration.twig index 2bb2448..8df6a0d 100644 --- a/Swift/blocks/method/method-declaration.twig +++ b/Swift/blocks/method/method-declaration.twig @@ -9,4 +9,4 @@ {%- set funcName = utils.decapitalize(method.name) -%} -{{ isStatic ? "static " : "" }}func {{ funcName }}({%- if hasBody -%}{{ bodyParamName }}: {{ bodyTypeName }},{{ " " }}{%- endif -%}requestEncoding: ParameterEncoding?, requestHeaders: HTTPHeaders?, additionalValidStatusCodes: Set) -> Single<{{ method.responseType.type.typeName }}> +{{ isStatic ? "static " : "" }}func {{ funcName }}({%- if hasBody -%}{{ bodyParamName }}: {{ bodyTypeName }},{{ " " }}{%- endif -%}requestEncoding: ParameterEncoding?, requestHeaders: HTTPHeaders?, additionalValidStatusCodes: Set) -> Single<{{ utils.formatValueType(method.apiResponseType) }}> diff --git a/Swift/blocks/method/method-func.twig b/Swift/blocks/method/method-func.twig index f9df44d..c0012a9 100644 --- a/Swift/blocks/method/method-func.twig +++ b/Swift/blocks/method/method-func.twig @@ -14,7 +14,7 @@ public {{ isStatic ? "static " : "" }}func {{ funcName }}({%- if hasBody -%}{{ bodyParamName }}: {{ bodyTypeName }},{{ "\n " }}{%- endif -%} requestEncoding: ParameterEncoding? = nil, requestHeaders: HTTPHeaders? = nil, - additionalValidStatusCodes: Set = []) -> Single<{{ method.responseType.type.typeName }}> { + additionalValidStatusCodes: Set = []) -> Single<{{ utils.formatValueType(method.apiResponseType) }}> { {% if isStatic -%} return shared.{{ funcName }}({%- if hasBody -%}{{ bodyParamName }}: {{ bodyParamName }},{{ "\n " }}{%- endif -%}