-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package io.quarkus.search.app; | ||
|
||
public record SearchHit(String foo) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.quarkus.search.app; | ||
|
||
import java.util.List; | ||
|
||
public record SearchResult<T> (long total, List<T> hits) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package io.quarkus.search.app; | ||
|
||
import java.util.List; | ||
|
||
import org.jboss.resteasy.reactive.RestQuery; | ||
|
||
import jakarta.enterprise.context.ApplicationScoped; | ||
import jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.Path; | ||
import jakarta.ws.rs.Produces; | ||
import jakarta.ws.rs.core.MediaType; | ||
import org.eclipse.microprofile.openapi.annotations.Operation; | ||
|
||
@ApplicationScoped | ||
@Path("/") | ||
public class SearchService { | ||
|
||
@GET | ||
@Produces(MediaType.APPLICATION_JSON) | ||
@Operation(summary = "Search for any resource") | ||
public SearchResult<SearchHit> search(@RestQuery String q) { | ||
return new SearchResult<>(1, List.of(new SearchHit("not-implemented-yet"))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,20 @@ quarkus.http.access-log.exclude-pattern=/q/.* | |
quarkus.management.enabled=true | ||
quarkus.info.enabled=true | ||
|
||
# OpenAPI | ||
mp.openapi.extensions.smallrye.info.title=Quarkus Search API | ||
%dev.mp.openapi.extensions.smallrye.info.title=Quarkus Search API (dev) | ||
%test.mp.openapi.extensions.smallrye.info.title=Quarkus Search API (test) | ||
mp.openapi.extensions.smallrye.info.version=1.0.0 | ||
mp.openapi.extensions.smallrye.info.description=Search Quarkus resources | ||
mp.openapi.extensions.smallrye.info.contact.email=[email protected] | ||
mp.openapi.extensions.smallrye.info.contact.name=Quarkus team | ||
mp.openapi.extensions.smallrye.info.contact.url=https://github.com/yrodiere/search.quarkus.io | ||
|
||
# Swagger UI | ||
quarkus.swagger-ui.always-include=true | ||
quarkus.swagger-ui.title=Quarkus Search API | ||
|
||
# Deployment to OpenShift | ||
%prod.quarkus.openshift.labels."app"=search.quarkus.io | ||
# Renew the SSL certificate automatically | ||
|