You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
whereas if swapping runtime.BindStyledParameterWithLocation("simple", false, "identifier", runtime.ParamLocationPath, chi.URLParam(r, "identifier"), &identifier) with runtime.BindStyledParameter("simple", false, "identifier", chi.URLParam(r, "identifier"), &identifier)
We get the following errors
Error: Not equal:
expected: "hello+world.hello world"
actual : "hello world.hello world"
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-hello+world.hello world
+hello world.hello world
Test: TestEscapedURLParams
--- FAIL: TestEscapedURLParams (0.01s)
Expected :hello+world.hello world
Actual :hello world.hello world
The text was updated successfully, but these errors were encountered:
Same here. I am using the gorilla/mux. + in path covert to ' '. Because BindStyledParameterWithOptions call url.QueryUnescape with no ParamLocationPath optition.
Using codegen 1.11.0 for chi-server and this is the output for a path parameter:
although I would have expected BindStyledParameterWithLocation to be used instead as seen in the corresponding template https://github.com/deepmap/oapi-codegen/blob/d38f1c9e74308ba7950657df952d49f97606355f/pkg/codegen/templates/chi/chi-middleware.tmpl#L33
The parsing is incorrect for parameter using
+
character for instanceTo reproduce:
the following test passes
whereas if swapping
runtime.BindStyledParameterWithLocation("simple", false, "identifier", runtime.ParamLocationPath, chi.URLParam(r, "identifier"), &identifier)
withruntime.BindStyledParameter("simple", false, "identifier", chi.URLParam(r, "identifier"), &identifier)
We get the following errors
The text was updated successfully, but these errors were encountered: