-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
Allow prepending input path to HttpInterpreter generated Tapir endpoints #2188
Allow prepending input path to HttpInterpreter generated Tapir endpoints #2188
Conversation
I gave it a try and I see what you mean about the streams type. This solution is a little bit specific but the implementation is short and simple so it seems ok. @kyri-petrou @paulpdaniels any better idea or shall we just ship this? |
Is there anything we can do with this other than append path prefixes? Perhaps it would be better in that case to just expose a |
Hi @paulpdaniels, I think it has to be The path with multiple segments and without output into To my knowledge this is how it works:
PS I can think of making the input as Example: HttpInterpreter(graphql)
.prependPath("graphql" :: "api" :: Nil)
...
.serverEndpoints[Env, ZioStreams](ZioStreams) |
9ae7083
to
0c87512
Compare
0c87512
to
56aada0
Compare
Narrowed it down to just PS I tried to make input as |
How about the WebSocketInterpreter? Can it be added there too? |
Thanks! |
Hi,
I did not manage to implement full endpoints mapping because mapping over endpoints would depend on
Streams
and I can't figure out the type parameters 😞, since streams instance is provided only when.serverEndpoints
is called (last step in the builder).But I managed to expose Tapir's
.prependIn
endpoint combinator to add an extraEndpointInput[Unit]
for thePublicEndpoint
thatHttpInterpreter
makes.It does the job, I can use
HttpInterpreter
like this now (tested with real project):Any help / feedback is very welcome 🙏
Issue #2185
Oleksii