diff --git a/wise-webapp/doc/REST Services.md b/wise-webapp/doc/REST Services.md new file mode 100644 index 00000000..53817922 --- /dev/null +++ b/wise-webapp/doc/REST Services.md @@ -0,0 +1,11 @@ +REST Services +--------------- + +Obtaining user information by email: + +curl "http://localhost:8080/service/admin/users/email/{user.email}.json" --get --basic -u "admin@wisemapping.org:admin" + +Deleting a based on the user id: +curl "http://localhost:8080/service/admin/users/{userId}" --request delete --basic -u "admin@wisemapping.org:admin" + + diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/DebugMappingJacksonHttpMessageConverter.java b/wise-webapp/src/main/java/com/wisemapping/rest/DebugMappingJacksonHttpMessageConverter.java index 9337d42b..4452480f 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/DebugMappingJacksonHttpMessageConverter.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/DebugMappingJacksonHttpMessageConverter.java @@ -23,12 +23,15 @@ public class DebugMappingJacksonHttpMessageConverter extends MappingJacksonHttpM } catch (org.springframework.http.converter.HttpMessageNotReadableException e) { throw new HttpMessageNotReadableException("Request Body:\n" + new String(bytes, "UTF-8"), e); } + catch (IOException e) { + throw new HttpMessageNotReadableException("Request Body:\n" + new String(bytes, "UTF-8"), e); + } } } class HttpMessageNotReadableException extends org.springframework.http.converter.HttpMessageNotReadableException { - public HttpMessageNotReadableException(String msg, org.springframework.http.converter.HttpMessageNotReadableException cause) { + public HttpMessageNotReadableException(String msg, Exception cause) { super(msg, cause); } } diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/RestMvcConfiguration.java b/wise-webapp/src/main/java/com/wisemapping/rest/RestMvcConfiguration.java index 436316d6..42ee9131 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/RestMvcConfiguration.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/RestMvcConfiguration.java @@ -17,6 +17,7 @@ public class RestMvcConfiguration extends WebMvcConfigurerAdapter { @Override public void configureMessageConverters(@NotNull final List> converters) { converters.add(converter()); + configureMessageConverters(converters); } @Bean