smithy4s icon indicating copy to clipboard operation
smithy4s copied to clipboard

Incorrect routing when the URL differs by a static query param only

Open msosnicki opened this issue 3 months ago • 2 comments

The example below, while is a valid smithy, fails to be routed correctly by smithy4s. The routing mechanism uses a combination of HTTP method and path, where path is just a part without query params. As a result, one of these endpoint will be receiving both types of requests.

$version: "2"

namespace example

use alloy#simpleRestJson

@simpleRestJson
service ExampleService {
  version: "1.0.0",
  operations: [GetQuery, GetQueryStatic]
}

@http(method: "GET", uri: "/get-query")
operation GetQuery {
}

@http(method: "GET", uri: "/get-query?static")
operation GetQueryStatic {
}

msosnicki avatar Nov 08 '24 06:11 msosnicki