Skip to content

Commit

Permalink
Merge pull request #154 from EFA-FHB/release/v1-0-13
Browse files Browse the repository at this point in the history
Release/v1-0-13
  • Loading branch information
gediminasre authored Jan 17, 2024
2 parents 1fa55bf + 45c2176 commit 9e27b83
Show file tree
Hide file tree
Showing 206 changed files with 125,202 additions and 38 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ General process of validation:

The current Blacklist can be found here: [excluded_rules.txt](src/main/resources/schematron/de/excluded_rules.txt)


## Tech stack

- [Java 11](https://openjdk.java.net/projects/jdk/11/)
Expand All @@ -41,6 +42,7 @@ The current Blacklist can be found here: [excluded_rules.txt](src/main/resources
- 0.0.1
- 1.0.0
- 1.5.1
- 1.10.0

## Hardware

Expand Down
30 changes: 12 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
id 'org.sonarqube'
id 'maven-publish'
id 'org.ajoberstar.grgit' version '5.0.0'
id "com.diffplug.spotless" version "6.22.0"
id "com.diffplug.spotless" version "6.24.0"
id "com.github.vlsi.jandex" version "1.90"
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
Expand All @@ -17,7 +17,7 @@ apply from: rootProject.file('gradle/install-git-hooks.gradle')

allprojects {
group = project.group
version = project.version
version = project.version + "-" + getCheckedOutGitCommitHash()
}

repositories {
Expand Down Expand Up @@ -71,9 +71,10 @@ dependencies {

testImplementation 'io.quarkus:quarkus-junit5'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0'

testImplementation 'io.rest-assured:rest-assured:3.0.0'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.0'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.16.0'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.16.1'
constraints {
implementation('org.yaml:snakeyaml:2.0') {
because 'version 1.33 is vulnerable to CVE-2022-1471'
Expand Down Expand Up @@ -138,7 +139,10 @@ sonarqube {
property "sonar.projectKey", "EFA-FHB_eforms-validator-core"
property "sonar.projectName", "eforms-validator-core"
property "sonar.organization", "efa-fhb"
property 'sonar.inclusions', "**/service/**"
property "sonar.language", "java"
property "sonar.java.coveragePlugin", "jacoco"
property "sonar.coverage.jacoco.xmlReportPaths", "build/jacoco-report/jacoco.xml"
property 'sonar.inclusions', "**/service/**, **/enums/**, **/validation/**"
}
}

Expand All @@ -149,21 +153,11 @@ tasks.named('jacocoTestReport').configure {
test.finalizedBy jacocoTestReport

jacocoTestReport {

reports {
xml.getRequired().set(true)
csv.getRequired().set(false)
html.getRequired().set(false)
}

dependsOn processJandexIndex
getExecutionData().setFrom(fileTree(buildDir).include("jacoco/*.exec"))

afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: ["**/build/generated/*"])
}))
reports {
xml.required = true
}
dependsOn processResources, quarkusGenerateCode, compileJava
}

tasks.named('sonarqube').configure {
Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ org.gradle.caching=true

#Scripts needs adoption if this name is being removed
name=eforms-validator-core
version=1.0.12
version=1.0.13
group=com.nortal.efafhb.eforms.validator


# Spotless (Java 17)
org.gradle.jvmargs=--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public enum EFormSupportedVersion {
V15("eforms-sdk-1.5", "1.5.5"),
V17("eforms-sdk-1.7", "1.7.2"),
VD10("eforms-de-1.0", "1.0.1"),
VD11("eforms-de-1.1", "1.1.0");
VD11("eforms-de-1.1", "1.1.0"),
V110("eforms-sdk-1.10", "1.10.0");

private final String eformsVersion;
private final String supportedVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ public enum SupportedVersion {
V1_0_1("1.0.1"),
V1_0_0("1.0.0"),
V0_1_1("0.1.1"),
V1_1_0("1.1.0");
V1_1_0("1.1.0"),
V1_10_0("1.10.0");

private final String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public class ValidatorRequestDTO {

@NotNull(message = "Version must not be null")
@FormParam("eformsVersion")
private @Pattern(regexp = "^[\\d]\\.[\\d]$", message = "BAD_EFORM_VERSION_FORMAT") String version;
private @Pattern(regexp = "^[\\d]\\.(\\d+)$", message = "BAD_EFORM_VERSION_FORMAT") String
version;

@NotNull(message = "Sdk type must not be null.")
@FormParam("sdkType")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@ConfigMapping(prefix = "eforms-validator.api")
public interface ValidationConfig {

String EFORMS_VERSION_REGEXP = "^eforms-(sdk|de)-[\\d+].[\\d+]$";
String EFORMS_VERSION_REGEXP = "^eforms-(sdk|de)-(\\d+).(\\d+)$";
String EFORMS_VERSION_MESSAGE = "Bad eForm version format";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ private String getSchematronEntryFileName(SupportedVersion version) {
case V1_0_0:
case V1_5_5:
case V1_7_2:
case V1_10_0:
return "complete-validation.sch";
case V1_0_1:
case V1_1_0:
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ quarkus.log.category."com.nortal".level=${APP_LOG_CATEGORY__COM_NORTAL__LEVEL:IN
quarkus.application.name=eforms-validator-core

#if gdk validator is used corresponding sdk version should be added to
eforms-validator.api.supported_eforms_versions=${APP_API_SUPPORTED_EFORMS_VERSIONS:eforms-de-1.0,eforms-de-1.1,eforms-sdk-1.5,eforms-sdk-1.7}
eforms-validator.api.supported_eforms_versions=${APP_API_SUPPORTED_EFORMS_VERSIONS:eforms-de-1.0,eforms-de-1.1,eforms-sdk-1.5,eforms-sdk-1.7,eforms-sdk-1.10}
eforms-validator.api.de_schematron_phase=${APP_API_DE_SCHEMATRON_PHASE:eforms-de-phase}
%test.eforms-validator.api.de_schematron_phase=testing-phase

eforms-validator.engine=${APP_EFORMS_VALIDATOR_ENGINE:phax}
eforms-validator.engine=phax
#possibility to exclude the rule regarding the notice file naming until it is fully supported
eforms-validator.business_document_notice_file_naming_rule_included=${APP_API_BUSINESS_DOCUMENT_NOTICE_FILE_NAMING_RULE_INCLUDED:true}
eforms-validator.ignored_rules.config.filepath=${APP_API_IGNORED_RULES_FILEPATH}
Expand All @@ -43,4 +43,5 @@ quarkus.swagger-ui.always-include=true
quarkus.smallrye-openapi.additional-docs-directory=openapi/
quarkus.smallrye-openapi.path=/eForms-validation_service_REST-API.json
mp.openapi.extensions.smallrye.info.version=${OPENAPI_INFO_VERSION:${openapiInfoVersion}}

quarkus.smallrye-openapi.security-scheme.basic.enabled=false
quarkus.smallrye-openapi.auto-add-security=false
6 changes: 4 additions & 2 deletions src/main/resources/openapi/public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ info:
* eForms-EU 1.5.5 [https://github.com/OP-TED/eForms-SDK/tree/1.5.5](https://github.com/OP-TED/eForms-SDK/tree/1.5.5)
* eForms-DE 1.0.1 (eforms-de-schematron v0.5.3) [https://projekte.kosit.org/eforms/eforms-de-schematron/-/tags/v0.5.3](https://projekte.kosit.org/eforms/eforms-de-schematron/-/tags/v0.5.3) und eForms-EU 1.5.5 [https://github.com/OP-TED/eForms-SDK/tree/1.5.5](https://github.com/OP-TED/eForms-SDK/tree/1.5.5)
* eForms-DE 1.1.0 (eforms-de-schematron v0.7.2) [https://projekte.kosit.org/eforms/eforms-de-schematron/-/tags/v0.7.2](https://projekte.kosit.org/eforms/eforms-de-schematron/-/tags/v0.7.2) und eForms-EU 1.7.2 [https://github.com/OP-TED/eForms-SDK/tree/1.7.2](https://github.com/OP-TED/eForms-SDK/tree/1.7.2)
* eForms-EU 1.10.0 [https://github.com/OP-TED/eForms-SDK/tree/1.10.0](https://github.com/OP-TED/eForms-SDK/tree/1.10.0)
contact:
name: oeffentliche-vergabe-support@nortal.com
email: oeffentliche-vergabe-support@nortal.com

version: 1.0.0
version: 1.0.13

paths:
/v1/eforms-validation:
Expand Down Expand Up @@ -191,4 +193,4 @@ components:
enum:
- XSD
- SCHEMATRON
example: SCHEMATRON
example: SCHEMATRON
Loading

0 comments on commit 9e27b83

Please sign in to comment.