Skip to content

Multiple smithy services? #238

Answered by Baccata
Quafadas asked this question in Q&A
May 31, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hey there, those are pretty good question. Also, thanks for accompanying them with a repo, it greatly helps formulate an answer.

1. Why are the todo routes not working ?

It's because your <+> call is working at the level of Either, not at the level of HttpRoute. Therefore, it returns the first non-left value, as oppose to an either containing the sum of both successes.

See the instance for `SemigroupK[Either[E, *]]

So your allRoutes value should look like :

val allRoutes = (helloRoutes, todoRoutes).mapN(_ <+> _ ).map(_ <+> docHelloRoutes <+> docTodoRoutes).map(_.orNotFound)

2. Why do the docs UX suck when there's more than one service

Well, we're very aware of this. There's an open issue

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Quafadas
Comment options

Answer selected by Quafadas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants