-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] SttpMockServerClient doesnt handle query params correctly #4219
Comments
Sure, PRs are very welcome :) |
Created one with my first attempt :) Had a few problems in the beginning getting the tests running in intellij as the compiler complained that "-Yretain-trees" was missing |
Hm |
Running the tests through sbt is fine but running them through Intellij test runner compiles too much so that the enumeratum tests are compiled without retain-trees being enabled. Maybe I am doing something wrong - I am not too versed in sbt. Also running |
Tapir version: 1.11.10
Scala version: 3.5.2
Describe the bug
When using query Parameters in an endpoint, the Mock Server expectation contains only a path parameter with the query params encoded
but the resulting request encodes the query Parameters in an object :
Mock Server cannot handle this deviation and the test fails.
How to reproduce?
I adapted the minimal example to also use one query parameter
Additional information
My guess is that we will need to expand
ExpectationRequestDefinition
withqueryStringParameters
and update its constructor. I would like to create a pull request if this approach is fine with you.The text was updated successfully, but these errors were encountered: