-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove client notification by rest * remove client notification by rest * add changes to minio connection * add working version * add extensions * remove extensions * change page names * modularize * add cdi events * add integration tests * add integration tests
- Loading branch information
1 parent
3ba4b3a
commit df75b1c
Showing
75 changed files
with
4,177 additions
and
1,088 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 |
---|---|---|
@@ -1,2 +1,19 @@ | ||
# | ||
# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates | ||
# and other contributors as indicated by the @author tags. | ||
# | ||
# Licensed under the Eclipse Public License - v 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip | ||
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar |
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,66 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
Copyright 2019 Project OpenUBL, Inc. and/or its affiliates | ||
and other contributors as indicated by the @author tags. | ||
Licensed under the Eclipse Public License - v 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
https://www.eclipse.org/legal/epl-2.0/ | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" | ||
xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>io.github.project-openubl</groupId> | ||
<artifactId>xml-sender</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>xml-sender-api-core</artifactId> | ||
<name>XML Sender :: API Core</name> | ||
|
||
<dependencies> | ||
<!--Quarkus--> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-resteasy</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-smallrye-health</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-smallrye-openapi</artifactId> | ||
</dependency> | ||
|
||
<!--Test--> | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-junit5</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.rest-assured</groupId> | ||
<artifactId>rest-assured</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
45 changes: 45 additions & 0 deletions
45
api-core/src/main/java/io/github/project/openubl/xmlsender/resources/ApiApplication.java
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,45 @@ | ||
/** | ||
* Copyright 2019 Project OpenUBL, Inc. and/or its affiliates | ||
* and other contributors as indicated by the @author tags. | ||
* | ||
* Licensed under the Eclipse Public License - v 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.github.project.openubl.xmlsender.resources; | ||
|
||
import org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition; | ||
import org.eclipse.microprofile.openapi.annotations.info.Contact; | ||
import org.eclipse.microprofile.openapi.annotations.info.Info; | ||
import org.eclipse.microprofile.openapi.annotations.info.License; | ||
|
||
import javax.ws.rs.ApplicationPath; | ||
import javax.ws.rs.core.Application; | ||
|
||
@OpenAPIDefinition( | ||
info = @Info( | ||
title = "XML Sender API", | ||
version = "1.0.0", | ||
contact = @Contact( | ||
name = "XML Sender API Support", | ||
url = "https://github.com/project-openubl/xml-sender/issues", | ||
email = "projectopenubl+subscribe@googlegroups.com" | ||
), | ||
license = @License( | ||
name = "Eclipse Public License - v 2.0", | ||
url = "https://www.eclipse.org/legal/epl-2.0/" | ||
) | ||
) | ||
) | ||
@ApplicationPath(ApiApplication.API_BASE) | ||
public class ApiApplication extends Application { | ||
public static final String API_BASE = "/api"; | ||
} |
44 changes: 44 additions & 0 deletions
44
...c/main/java/io/github/project/openubl/xmlsender/resources/ValidationExceptionHandler.java
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,44 @@ | ||
/** | ||
* Copyright 2019 Project OpenUBL, Inc. and/or its affiliates | ||
* and other contributors as indicated by the @author tags. | ||
* | ||
* Licensed under the Eclipse Public License - v 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.github.project.openubl.xmlsender.resources; | ||
|
||
import org.jboss.resteasy.api.validation.ResteasyConstraintViolation; | ||
import org.jboss.resteasy.api.validation.ResteasyViolationException; | ||
|
||
import javax.ws.rs.core.MediaType; | ||
import javax.ws.rs.core.Response; | ||
import javax.ws.rs.ext.ExceptionMapper; | ||
import javax.ws.rs.ext.Provider; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
@Provider | ||
public class ValidationExceptionHandler implements ExceptionMapper<ResteasyViolationException> { | ||
@Override | ||
public Response toResponse(ResteasyViolationException e) { | ||
Map<String, String> violationMessages = new HashMap<>(); | ||
for (ResteasyConstraintViolation violation : e.getViolations()) { | ||
String key = violation.getPath(); | ||
violationMessages.put(key, "[" + violation.getValue() + "] " + violation.getMessage()); | ||
} | ||
|
||
return Response.status(400) | ||
.type(MediaType.APPLICATION_JSON) | ||
.entity(violationMessages) | ||
.build(); | ||
} | ||
} |
Oops, something went wrong.