Skip to content

Commit

Permalink
Merge pull request #155 from SwissDataScienceCenter/api-paths
Browse files Browse the repository at this point in the history
Additionally mount search endpoint to /api/search/query
  • Loading branch information
eikek authored Jun 18, 2024
2 parents ab5b633 + e21af66 commit ea36370
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ final class Routes[F[_]: Async: Network](
):
private val logger = scribe.cats.effect[F]

private val prefix = "/search"

private val makeJwtVerify =
ClientBuilder(EmberClientBuilder.default[F])
.withDefaultRetry(RetryConfig.default)
Expand All @@ -71,11 +69,13 @@ final class Routes[F[_]: Async: Network](

private def searchHttpRoutes(searchRoutes: SearchRoutes[F]) =
Router[F](
prefix -> (openApiRoute(searchRoutes).routes <+> searchRoutes.routes)
"/search" -> (openApiRoute(searchRoutes).routes <+> searchRoutes.routes),
"/api/search/query" -> (openApiRoute(searchRoutes).routes <+> searchRoutes.routes),
"/search/query" -> (openApiRoute(searchRoutes).routes <+> searchRoutes.routes)
)

private def openApiRoute(searchRoutes: SearchRoutes[F]) =
OpenApiRoute[F](s"/api$prefix", "Renku Search API", searchRoutes.endpoints)
OpenApiRoute[F](s"/api/search/query", "Renku Search API", searchRoutes.endpoints)

private lazy val operationHttpRoutes =
Router[F]("/" -> OperationRoutes[F])
Expand Down

0 comments on commit ea36370

Please sign in to comment.