Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

import io.github.belgif.rest.problem.api.Input;
import io.github.belgif.rest.problem.api.Problem;
import io.github.belgif.rest.problem.ee.jaxrs.client.ProblemSupport;
import io.github.belgif.rest.problem.ee.resteasy.client.ResteasyProblemSupport;
import io.github.belgif.rest.problem.ee.client.jaxrs.ProblemSupport;
import io.github.belgif.rest.problem.ee.client.resteasy.ResteasyProblemSupport;
import io.github.belgif.rest.problem.i18n.I18N;
import io.github.belgif.rest.problem.it.model.Bean;
import io.github.belgif.rest.problem.it.model.ChildModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import jakarta.ws.rs.ext.Provider;

import io.github.belgif.rest.problem.api.InEnum;
import io.github.belgif.rest.problem.ee.jaxrs.AbstractInputParamConverterProvider;
import io.github.belgif.rest.problem.ee.server.jaxrs.AbstractInputParamConverterProvider;

@Provider
public class LocalDateConverter extends AbstractInputParamConverterProvider<LocalDate> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

import io.github.belgif.rest.problem.api.Input;
import io.github.belgif.rest.problem.api.Problem;
import io.github.belgif.rest.problem.ee.jaxrs.client.ProblemSupport;
import io.github.belgif.rest.problem.ee.resteasy.client.ResteasyProblemSupport;
import io.github.belgif.rest.problem.ee.client.jaxrs.ProblemSupport;
import io.github.belgif.rest.problem.ee.client.resteasy.ResteasyProblemSupport;
import io.github.belgif.rest.problem.i18n.I18N;
import io.github.belgif.rest.problem.it.model.Bean;
import io.github.belgif.rest.problem.it.model.ChildModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import javax.ws.rs.ext.Provider;

import io.github.belgif.rest.problem.api.InEnum;
import io.github.belgif.rest.problem.ee.jaxrs.AbstractInputParamConverterProvider;
import io.github.belgif.rest.problem.ee.server.jaxrs.AbstractInputParamConverterProvider;

@Provider
public class LocalDateConverter extends AbstractInputParamConverterProvider<LocalDate> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import io.github.belgif.rest.problem.BadRequestProblem;
import io.github.belgif.rest.problem.api.InEnum;
import io.github.belgif.rest.problem.ee.jaxrs.AbstractInputParamConverterProvider;
import io.github.belgif.rest.problem.ee.server.jaxrs.AbstractInputParamConverterProvider;

@Provider
public class LocalDateConverter extends AbstractInputParamConverterProvider<LocalDate> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package io.github.belgif.rest.problem.ee.jaxrs.client;
package io.github.belgif.rest.problem.ee.client.jaxrs;

import javax.annotation.Priority;
import javax.ws.rs.Priorities;
import javax.ws.rs.ext.ContextResolver;

import com.fasterxml.jackson.databind.ObjectMapper;

import io.github.belgif.rest.problem.ee.jaxrs.ProblemObjectMapper;
import io.github.belgif.rest.problem.ee.core.jaxrs.ProblemObjectMapper;

/**
* Separate client-side ObjectMapper ContextResolver.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs.client;
package io.github.belgif.rest.problem.ee.client.jaxrs;

import java.security.KeyStore;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs.client;
package io.github.belgif.rest.problem.ee.client.jaxrs;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs.client;
package io.github.belgif.rest.problem.ee.client.jaxrs;

import java.io.IOException;

Expand All @@ -19,9 +19,9 @@

import io.github.belgif.rest.problem.DefaultProblem;
import io.github.belgif.rest.problem.api.Problem;
import io.github.belgif.rest.problem.ee.jaxrs.JaxRsUtil;
import io.github.belgif.rest.problem.ee.jaxrs.ProblemMediaType;
import io.github.belgif.rest.problem.ee.jaxrs.ProblemObjectMapper;
import io.github.belgif.rest.problem.ee.core.jaxrs.JaxRsUtil;
import io.github.belgif.rest.problem.ee.core.jaxrs.ProblemMediaType;
import io.github.belgif.rest.problem.ee.core.jaxrs.ProblemObjectMapper;

/**
* JAX-RS ClientResponseFilter that converts problem response to a ProblemWrapper exception.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs.client;
package io.github.belgif.rest.problem.ee.client.jaxrs;

import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
Expand All @@ -9,7 +9,7 @@

import io.github.belgif.rest.problem.DefaultProblem;
import io.github.belgif.rest.problem.api.Problem;
import io.github.belgif.rest.problem.ee.jaxrs.ProblemMediaType;
import io.github.belgif.rest.problem.ee.core.jaxrs.ProblemMediaType;

/**
* Client-side problem mapper for MicroProfile REST Client.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.github.belgif.rest.problem.ee.jaxrs.client;
package io.github.belgif.rest.problem.ee.client.jaxrs;

import org.eclipse.microprofile.rest.client.RestClientBuilder;
import org.eclipse.microprofile.rest.client.spi.RestClientListener;

import io.github.belgif.rest.problem.ee.jaxrs.JaxRsUtil;
import io.github.belgif.rest.problem.ee.util.Platform;
import io.github.belgif.rest.problem.ee.core.jaxrs.JaxRsUtil;
import io.github.belgif.rest.problem.ee.core.util.Platform;

/**
* Listener that enables problem support for MicroProfile REST Clients.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs.client;
package io.github.belgif.rest.problem.ee.client.jaxrs;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
Expand All @@ -15,8 +15,8 @@
import javax.ws.rs.client.Invocation;
import javax.ws.rs.client.WebTarget;

import io.github.belgif.rest.problem.ee.jaxrs.JaxRsUtil;
import io.github.belgif.rest.problem.ee.util.Platform;
import io.github.belgif.rest.problem.ee.core.jaxrs.JaxRsUtil;
import io.github.belgif.rest.problem.ee.core.util.Platform;

/**
* Utility class for enabling problem support on JAX-RS Clients.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs.client;
package io.github.belgif.rest.problem.ee.client.jaxrs;

import javax.ws.rs.client.ResponseProcessingException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.resteasy.client;
package io.github.belgif.rest.problem.ee.client.resteasy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
Expand All @@ -7,12 +7,12 @@

import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;

import io.github.belgif.rest.problem.ee.jaxrs.JaxRsUtil;
import io.github.belgif.rest.problem.ee.jaxrs.client.ClientProblemObjectMapperContextResolver;
import io.github.belgif.rest.problem.ee.jaxrs.client.ProblemClientResponseFilter;
import io.github.belgif.rest.problem.ee.jaxrs.client.ProblemSupport;
import io.github.belgif.rest.problem.ee.jaxrs.client.ProblemWrapper;
import io.github.belgif.rest.problem.ee.util.Platform;
import io.github.belgif.rest.problem.ee.client.jaxrs.ClientProblemObjectMapperContextResolver;
import io.github.belgif.rest.problem.ee.client.jaxrs.ProblemClientResponseFilter;
import io.github.belgif.rest.problem.ee.client.jaxrs.ProblemSupport;
import io.github.belgif.rest.problem.ee.client.jaxrs.ProblemWrapper;
import io.github.belgif.rest.problem.ee.core.jaxrs.JaxRsUtil;
import io.github.belgif.rest.problem.ee.core.util.Platform;

/**
* Utility class for enabling problem support on RESTEasy Clients.
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
io.github.belgif.rest.problem.ee.jaxrs.client.ProblemRestClientListener
io.github.belgif.rest.problem.ee.client.jaxrs.ProblemRestClientListener
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs.client;
package io.github.belgif.rest.problem.ee.client.jaxrs;

import static org.assertj.core.api.Assertions.*;
import static org.mockito.Mockito.*;
Expand All @@ -18,7 +18,7 @@

import com.fasterxml.jackson.databind.ObjectMapper;

import io.github.belgif.rest.problem.ee.CdiProblemTypeRegistry;
import io.github.belgif.rest.problem.ee.core.CdiProblemTypeRegistry;
import io.github.belgif.rest.problem.registry.ProblemTypeRegistry;

@ExtendWith(MockitoExtension.class)
Expand All @@ -41,7 +41,8 @@ void mapper() {
when(instance.get()).thenReturn(registry);
when(registry.getProblemTypes()).thenReturn(new HashMap<>());
ObjectMapper mapper = new ClientProblemObjectMapperContextResolver().getContext(null);
assertThat(mapper.getRegisteredModuleIds()).contains("io.github.belgif.rest.problem.ee.CdiProblemModule");
assertThat(mapper.getRegisteredModuleIds())
.contains("io.github.belgif.rest.problem.ee.core.CdiProblemModule");
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs.client;
package io.github.belgif.rest.problem.ee.client.jaxrs;

import static org.assertj.core.api.Assertions.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs.client;
package io.github.belgif.rest.problem.ee.client.jaxrs;

import static org.assertj.core.api.Assertions.*;
import static org.mockito.Mockito.*;
Expand All @@ -23,7 +23,7 @@
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;

import io.github.belgif.rest.problem.ee.jaxrs.client.ProblemSupport.ClientInvocationHandler;
import io.github.belgif.rest.problem.ee.client.jaxrs.ProblemSupport.ClientInvocationHandler;

@ExtendWith(MockitoExtension.class)
class ProblemClientBuilderTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs.client;
package io.github.belgif.rest.problem.ee.client.jaxrs;

import static org.assertj.core.api.Assertions.*;
import static org.mockito.Mockito.*;
Expand Down Expand Up @@ -29,8 +29,8 @@
import io.github.belgif.rest.problem.BadRequestProblem;
import io.github.belgif.rest.problem.DefaultProblem;
import io.github.belgif.rest.problem.api.Problem;
import io.github.belgif.rest.problem.ee.jaxrs.JaxRsUtil;
import io.github.belgif.rest.problem.ee.jaxrs.ProblemMediaType;
import io.github.belgif.rest.problem.ee.core.jaxrs.JaxRsUtil;
import io.github.belgif.rest.problem.ee.core.jaxrs.ProblemMediaType;

@ExtendWith(MockitoExtension.class)
class ProblemClientResponseFilterTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs.client;
package io.github.belgif.rest.problem.ee.client.jaxrs;

import static org.assertj.core.api.Assertions.*;
import static org.mockito.Mockito.*;
Expand All @@ -16,7 +16,7 @@
import io.github.belgif.rest.problem.BadRequestProblem;
import io.github.belgif.rest.problem.DefaultProblem;
import io.github.belgif.rest.problem.api.Problem;
import io.github.belgif.rest.problem.ee.jaxrs.ProblemMediaType;
import io.github.belgif.rest.problem.ee.core.jaxrs.ProblemMediaType;

@ExtendWith(MockitoExtension.class)
class ProblemResponseExceptionMapperTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs.client;
package io.github.belgif.rest.problem.ee.client.jaxrs;

import static org.mockito.Mockito.*;

Expand All @@ -11,7 +11,7 @@
import org.mockito.MockedStatic;
import org.mockito.junit.jupiter.MockitoExtension;

import io.github.belgif.rest.problem.ee.util.Platform;
import io.github.belgif.rest.problem.ee.core.util.Platform;

@ExtendWith(MockitoExtension.class)
class ProblemRestClientListenerTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs.client;
package io.github.belgif.rest.problem.ee.client.jaxrs;

import static org.assertj.core.api.Assertions.*;
import static org.mockito.Mockito.*;
Expand All @@ -22,8 +22,8 @@
import org.mockito.junit.jupiter.MockitoExtension;

import io.github.belgif.rest.problem.BadRequestProblem;
import io.github.belgif.rest.problem.ee.jaxrs.client.ProblemSupport.ClientInvocationHandler;
import io.github.belgif.rest.problem.ee.util.Platform;
import io.github.belgif.rest.problem.ee.client.jaxrs.ProblemSupport.ClientInvocationHandler;
import io.github.belgif.rest.problem.ee.core.util.Platform;

@ExtendWith(MockitoExtension.class)
class ProblemSupportTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs.client;
package io.github.belgif.rest.problem.ee.client.jaxrs;

import static org.assertj.core.api.Assertions.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.resteasy.client;
package io.github.belgif.rest.problem.ee.client.resteasy;

import static org.assertj.core.api.Assertions.*;
import static org.mockito.Mockito.*;
Expand All @@ -16,10 +16,10 @@
import org.mockito.junit.jupiter.MockitoExtension;

import io.github.belgif.rest.problem.BadGatewayProblem;
import io.github.belgif.rest.problem.ee.jaxrs.client.ClientProblemObjectMapperContextResolver;
import io.github.belgif.rest.problem.ee.jaxrs.client.ProblemClientResponseFilter;
import io.github.belgif.rest.problem.ee.jaxrs.client.ProblemWrapper;
import io.github.belgif.rest.problem.ee.util.Platform;
import io.github.belgif.rest.problem.ee.client.jaxrs.ClientProblemObjectMapperContextResolver;
import io.github.belgif.rest.problem.ee.client.jaxrs.ProblemClientResponseFilter;
import io.github.belgif.rest.problem.ee.client.jaxrs.ProblemWrapper;
import io.github.belgif.rest.problem.ee.core.util.Platform;

@ExtendWith(MockitoExtension.class)
class ResteasyProblemSupportTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee;
package io.github.belgif.rest.problem.ee.core;

import javax.enterprise.inject.spi.CDI;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee;
package io.github.belgif.rest.problem.ee.core;

import java.util.Collections;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs;
package io.github.belgif.rest.problem.ee.core.jaxrs;

import java.util.function.Supplier;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs;
package io.github.belgif.rest.problem.ee.core.jaxrs;

import java.util.function.Consumer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs;
package io.github.belgif.rest.problem.ee.core.jaxrs;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.github.belgif.rest.problem.ee.jaxrs;
package io.github.belgif.rest.problem.ee.core.jaxrs;

import com.fasterxml.jackson.databind.ObjectMapper;

import io.github.belgif.rest.problem.ee.CdiProblemModule;
import io.github.belgif.rest.problem.ee.core.CdiProblemModule;

/**
* ObjectMapper that registers the CdiProblemModule.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs;
package io.github.belgif.rest.problem.ee.core.jaxrs;

import javax.annotation.Priority;
import javax.ws.rs.Priorities;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.util;
package io.github.belgif.rest.problem.ee.core.util;

/**
* Utility class to detect the runtime platform.
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
io.github.belgif.rest.problem.ee.CdiProblemTypeRegistry
io.github.belgif.rest.problem.ee.core.CdiProblemTypeRegistry
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee;
package io.github.belgif.rest.problem.ee.core;

import static org.mockito.Mockito.*;

Expand Down Expand Up @@ -37,7 +37,7 @@ void module() {
when(registry.getProblemTypes()).thenReturn(new HashMap<>());
CdiProblemModule module = new CdiProblemModule();
Assertions.assertThat(module.getModuleName())
.isEqualTo("io.github.belgif.rest.problem.ee.CdiProblemModule");
.isEqualTo("io.github.belgif.rest.problem.ee.core.CdiProblemModule");
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee;
package io.github.belgif.rest.problem.ee.core;

import static org.mockito.Mockito.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.belgif.rest.problem.ee.jaxrs;
package io.github.belgif.rest.problem.ee.core.jaxrs;

import static org.assertj.core.api.Assertions.*;
import static org.mockito.Mockito.*;
Expand Down
Loading