-
-
Notifications
You must be signed in to change notification settings - Fork 3
feat: upgrade deps, new prefix option, cleaning and typos #15
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
base: main
Are you sure you want to change the base?
Conversation
@jamietanna gentle ping, can I have your input here ? |
@jamietanna hello ? |
Hey @GreyXor apologies for the delay! Out of interest, how's your testing for this going so far? I've tried to take the Prefix functionality and add it into the -want:
+got:
# A request that is well-formed is passed through to the Handler
-POST /public-api/v1/resource was called
-Received an HTTP 204 response. Expected HTTP 204
+Received an HTTP 404 response. Expected HTTP 204
+Response body: no matching operation was found
|
Hello thanks, |
Hello, this PR contains a few improvements:
any
rather thaninterface{}
orhttp.NoBody
, rather thannil
This new prefix option is useful when you have an API whose server spec contains a subfolder. In my case, it's
/api
. But as I register my api withserver.RegisterHandlersWithBaseURL(s.EchoServer, server.NewStrictHandler(s.APIService.API, nil), "/api")
.The prefix is not visible to the router, so the validator can't see it either. Setting this new option to
/api
virtually removes the prefix. And makes the validator work properly.close: #11