Skip to content

URLSession and AHC transports double-encode path parameters #251

Closed
@sliemeobn

Description

@sliemeobn

When using String path parameters, the generated client (correctly) URL-encodes the values to be included in the path.
However, the server handler just passes the the "raw" string value in the input.path structure.

Eg:
using the generated client:

        let response = try await client.createRole(.init(
            path: .init(roleId: "A role"),
            ...
        ))

server code

    func createRole(_ input: Operations.createRole.Input) async throws -> 
      //input.path.roleId is "A%20role"
}

I would expect this to be symmetric and arrive decoded in the handler.

Metadata

Metadata

Assignees

Labels

area/transportAffects: Client or server transport library.kind/bugFeature doesn't work as expected.size/SSmall task. (A couple of hours of work.)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions