smithy4s
smithy4s copied to clipboard
Incorrect routing when the URL differs by a static query param only
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 {
}