Skip to content

Commit e719807

Browse files
committed
fix , when there was nested type
1 parent 8958ccf commit e719807

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/swift/Sources/Services/Service.swift.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ open class {{ service.name | caseUcfirst }}: Service {
2525
{%~ endif %}
2626
open func {{ method.name | caseCamel }}{% if method.responseModel | hasGenericType(spec) %}<T>{% endif %}(
2727
{%~ for parameter in method.parameters.all %}
28-
{{ parameter.name | caseCamel | escapeKeyword }}: {% if parameter.type == "object" %}T{% else %}{{ parameter | typeName | raw }}{% endif %}{% if not parameter.required %}? = nil{% endif %}{% if not loop.last or 'multipart/form-data' in method.consumes %},{% endif %}
28+
{{ parameter.name | caseCamel | escapeKeyword }}: {% if parameter.type == "object" %}T{% else %}{{ parameter | typeName | raw }}{% endif %}{% if not parameter.required %}? = nil{% endif %}{% if not loop.last or 'multipart/form-data' in method.consumes or method.responseModel | hasGenericType(spec) %},{% endif %}
2929

3030
{%~ endfor %}
3131
{%~ if method.responseModel | hasGenericType(spec) %}
32-
nestedType: T.Type,
32+
nestedType: T.Type
3333
{%~ endif %}
3434
{%~ if 'multipart/form-data' in method.consumes %}
3535
onProgress: ((UploadProgress) -> Void)? = nil

0 commit comments

Comments
 (0)