Skip to content

Commit

Permalink
Merge pull request #126 from quarkiverse/task/update-ext-names
Browse files Browse the repository at this point in the history
Update to new 3.10 extension names for Quarkus Rest
  • Loading branch information
kdubb authored Apr 26, 2024
2 parents e41a673 + 7be467c commit ea58f3d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive-server-spi-deployment</artifactId>
<artifactId>quarkus-rest-server-spi-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkiverse.zanzibar</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import jakarta.enterprise.context.ApplicationScoped;

import org.jboss.logging.Logger;

import io.quarkiverse.zanzibar.DefaultUserIdExtractor;
import io.quarkiverse.zanzibar.RelationshipManager;
import io.quarkiverse.zanzibar.UserIdExtractor;
Expand All @@ -12,6 +14,7 @@
import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
import io.quarkus.arc.deployment.SyntheticBeanBuildItem;
import io.quarkus.arc.deployment.UnremovableBeanBuildItem;
import io.quarkus.arc.deployment.ValidationPhaseBuildItem;
import io.quarkus.deployment.Capabilities;
import io.quarkus.deployment.Capability;
import io.quarkus.deployment.annotations.BuildProducer;
Expand All @@ -27,6 +30,8 @@ class ZanzibarProcessor {

public static final String FEATURE = "zanzibar";

private static final Logger log = Logger.getLogger(ZanzibarProcessor.class);

@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
Expand All @@ -43,15 +48,16 @@ void registerProvider(
BuildProducer<AdditionalBeanBuildItem> additionalBeans,
BuildProducer<UnremovableBeanBuildItem> unremovableBeans,
BuildProducer<ReflectiveClassBuildItem> reflectiveClass,
BuildProducer<AdditionalIndexedClassesBuildItem> additionalIndexedClasses) {
BuildProducer<AdditionalIndexedClassesBuildItem> additionalIndexedClasses,
BuildProducer<ValidationPhaseBuildItem.ValidationErrorBuildItem> validationErrors) {

if (!config.filter.enabled) {
return;
}

RuntimeValue<ZanzibarDynamicFeature.FilterFactory> filterFactory;

if (capabilities.isPresent(Capability.RESTEASY_REACTIVE)) {
if (capabilities.isPresent(Capability.REST) || capabilities.isPresent(Capability.RESTEASY_REACTIVE)) {

filterFactory = recorder.createReactiveFilterFactory();

Expand All @@ -66,6 +72,7 @@ void registerProvider(
additionalIndexedClasses.produce(new AdditionalIndexedClassesBuildItem(featureClass.getName()));
reflectiveClass.produce(ReflectiveClassBuildItem.builder(featureClass).fields(true).methods(true).build());
} else {
log.error("Zanzibar requires either the Quarkus REST or RESTEasy extension to be included");
return;
}

Expand Down
2 changes: 1 addition & 1 deletion integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive</artifactId>
<artifactId>quarkus-rest</artifactId>
</dependency>
<dependency>
<groupId>io.quarkiverse.zanzibar</groupId>
Expand Down
2 changes: 1 addition & 1 deletion runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive</artifactId>
<artifactId>quarkus-rest</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions zanzibar-authzed/integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive</artifactId>
<artifactId>quarkus-rest</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive-jackson</artifactId>
<artifactId>quarkus-rest-jackson</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down
4 changes: 2 additions & 2 deletions zanzibar-openfga/integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive</artifactId>
<artifactId>quarkus-rest</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive-jackson</artifactId>
<artifactId>quarkus-rest-jackson</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down

0 comments on commit ea58f3d

Please sign in to comment.