Skip to content

[BUG] [Swift5] Name collision with a query param named "path" #9903

@Eugeny

Description

@Eugeny

The Swift5 generator doesn't rename the optional path query param, resulting in code like this:

    open class func getAllMediaFilesWithRequestBuilder(..., path: String? = nil, ...) ... {
        let path = "/api/2/media/files"
         
        ...

        urlComponents?.queryItems = APIHelper.mapValuesToQueryItems([
            ...
            "path": path?.encodeToJSON(),
                        ^-- Cannot use optional chaining on non-optional value of type 'String'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions