File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
server/src/main/scala/app/softnetwork/api/server Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,20 @@ package app.softnetwork.api.server
22
33import akka .actor .typed .ActorSystem
44import akka .http .scaladsl .server .Route
5+ import sttp .tapir .server .ServerEndpoint
56
6- import scala .concurrent .ExecutionContext
7+ import scala .concurrent .{ ExecutionContext , Future }
78
8- trait ApiEndpoints extends ApiEndpoint with ApiRoutes {
9+ trait ApiEndpoints extends ApiRoutes {
10+
11+ import ApiEndpoint ._
12+
13+ def endPoints : ActorSystem [_] => List [ServerEndpoint [Any , Future ]]
914
1015 override def apiRoutes (system : ActorSystem [_]): Route = {
1116 implicit def ec : ExecutionContext = system.executionContext
12- apiRoute ~ swaggerRoute
17+ val routes = endPoints(system)
18+ routes ++ endpointsToSwaggerEndpoints(routes)
1319 }
1420
1521}
You can’t perform that action at this time.
0 commit comments