Skip to content

Commit

Permalink
Merge pull request #111 from ministryofjustice/lcam-1434-use_crime_co…
Browse files Browse the repository at this point in the history
…mmons_schemas

LCAM 1434 Update Evidence Service to Use Crime Commons Mod Schemas
  • Loading branch information
nigelpain authored Jul 5, 2024
2 parents b96469f + 15334c8 commit a107c76
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 123 deletions.
17 changes: 2 additions & 15 deletions crime-evidence/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ plugins {
id 'io.spring.dependency-management' version '1.1.4'
id "org.sonarqube" version "4.4.1.3373"
id "info.solidsoft.pitest" version "1.15.0"
id "org.jsonschema2dataclass" version "6.0.0"
}

group = "uk.gov.justice.laa.crime"
Expand All @@ -17,6 +16,7 @@ jacoco {
def versions = [
pitest : "1.16.0",
crimeCommonsClasses : "3.4.0",
commonsModSchemas : "1.5.0",
commonsRestClient : "3.4.0",
wmStubRunnerVersion : "4.1.2",
springDocWebMVCVersion: "2.5.0",
Expand All @@ -40,6 +40,7 @@ repositories {
dependencies {
implementation "uk.gov.justice.service.laa-crime:crime-commons-spring-boot-starter-rest-client:$versions.commonsRestClient:all"
implementation "uk.gov.justice.service.laa-crime:crime-commons-classes:$versions.crimeCommonsClasses"
implementation "uk.gov.justice.service.laa-crime:crime-commons-mod-schemas:$versions.commonsModSchemas"

implementation "org.springframework.boot:spring-boot-starter-validation"
implementation "org.springframework.boot:spring-boot-starter-oauth2-resource-server"
Expand Down Expand Up @@ -112,18 +113,4 @@ sonarqube {
property "sonar.pitest.mode", "reuseReport"
property "sonar.pitest.reportsDirectory", "build/reports/pitest"
}
}

jsonSchema2Pojo {
executions {
main {
methods.builders = true
methods.buildersDynamic = true
methods.annotateJsr303Jakarta = true
fields.floatUseBigDecimal = true
dateTime.dateTimeType = "java.time.LocalDateTime"
klass.targetPackage = "uk.gov.justice.laa.crime.evidence.model.common"
io.source.setFrom files("${project.rootDir}/src/main/resources/schemas")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;
import uk.gov.justice.laa.crime.evidence.dto.CapitalEvidenceDTO;
import uk.gov.justice.laa.crime.evidence.model.common.ApiCalculateEvidenceFeeRequest;
import uk.gov.justice.laa.crime.common.model.evidence.ApiCalculateEvidenceFeeRequest;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;
import uk.gov.justice.laa.crime.evidence.dto.CrimeEvidenceDTO;
import uk.gov.justice.laa.crime.evidence.model.common.ApiCalculateEvidenceFeeRequest;
import uk.gov.justice.laa.crime.common.model.evidence.ApiCalculateEvidenceFeeRequest;

@Component
@NoArgsConstructor(access = AccessLevel.PRIVATE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;
import uk.gov.justice.laa.crime.evidence.dto.EvidenceFeeDTO;
import uk.gov.justice.laa.crime.evidence.model.common.ApiCalculateEvidenceFeeRequest;
import uk.gov.justice.laa.crime.common.model.evidence.ApiCalculateEvidenceFeeRequest;

@Component
@NoArgsConstructor(access = AccessLevel.PRIVATE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import uk.gov.justice.laa.crime.evidence.builder.CrimeEvidenceDTOBuilder;
import uk.gov.justice.laa.crime.evidence.dto.CrimeEvidenceDTO;
import uk.gov.justice.laa.crime.evidence.dto.ErrorDTO;
import uk.gov.justice.laa.crime.evidence.model.common.ApiCalculateEvidenceFeeRequest;
import uk.gov.justice.laa.crime.evidence.model.common.ApiCalculateEvidenceFeeResponse;
import uk.gov.justice.laa.crime.common.model.evidence.ApiCalculateEvidenceFeeRequest;
import uk.gov.justice.laa.crime.common.model.evidence.ApiCalculateEvidenceFeeResponse;
import uk.gov.justice.laa.crime.evidence.service.EvidenceService;

@Slf4j
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import uk.gov.justice.laa.crime.evidence.common.Constants;
import uk.gov.justice.laa.crime.evidence.dto.CrimeEvidenceDTO;
import uk.gov.justice.laa.crime.evidence.dto.EvidenceFeeRulesDTO;
import uk.gov.justice.laa.crime.evidence.model.common.ApiCalculateEvidenceFeeResponse;
import uk.gov.justice.laa.crime.evidence.model.common.ApiEvidenceFee;
import uk.gov.justice.laa.crime.common.model.evidence.ApiCalculateEvidenceFeeResponse;
import uk.gov.justice.laa.crime.common.model.evidence.ApiEvidenceFee;
import uk.gov.justice.laa.crime.enums.EvidenceFeeLevel;
import uk.gov.justice.laa.crime.evidence.staticdata.enums.EvidenceFeeRules;

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.junit.jupiter.api.extension.ExtendWith;
import uk.gov.justice.laa.crime.evidence.data.builder.TestModelDataBuilder;
import uk.gov.justice.laa.crime.evidence.dto.EvidenceFeeDTO;
import uk.gov.justice.laa.crime.evidence.model.common.ApiCalculateEvidenceFeeRequest;
import uk.gov.justice.laa.crime.common.model.evidence.ApiCalculateEvidenceFeeRequest;
import uk.gov.justice.laa.crime.enums.EvidenceFeeLevel;

import static org.assertj.core.api.Assertions.assertThat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import uk.gov.justice.laa.crime.evidence.dto.CapitalEvidenceDTO;
import uk.gov.justice.laa.crime.evidence.dto.CrimeEvidenceDTO;
import uk.gov.justice.laa.crime.evidence.dto.EvidenceFeeDTO;
import uk.gov.justice.laa.crime.evidence.model.common.ApiCalculateEvidenceFeeRequest;
import uk.gov.justice.laa.crime.evidence.model.common.ApiCalculateEvidenceFeeResponse;
import uk.gov.justice.laa.crime.evidence.model.common.ApiCapitalEvidence;
import uk.gov.justice.laa.crime.evidence.model.common.ApiEvidenceFee;
import uk.gov.justice.laa.crime.common.model.evidence.ApiCalculateEvidenceFeeRequest;
import uk.gov.justice.laa.crime.common.model.evidence.ApiCalculateEvidenceFeeResponse;
import uk.gov.justice.laa.crime.common.model.evidence.ApiCapitalEvidence;
import uk.gov.justice.laa.crime.common.model.evidence.ApiEvidenceFee;
import uk.gov.justice.laa.crime.enums.EvidenceFeeLevel;

import java.time.LocalDateTime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import uk.gov.justice.laa.crime.evidence.common.Constants;
import uk.gov.justice.laa.crime.evidence.data.builder.TestModelDataBuilder;
import uk.gov.justice.laa.crime.evidence.dto.CrimeEvidenceDTO;
import uk.gov.justice.laa.crime.evidence.model.common.ApiCalculateEvidenceFeeResponse;
import uk.gov.justice.laa.crime.common.model.evidence.ApiCalculateEvidenceFeeResponse;
import uk.gov.justice.laa.crime.enums.EvidenceFeeLevel;

import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
Expand Down

0 comments on commit a107c76

Please sign in to comment.