Skip to content

Commit

Permalink
Merge pull request SORMAS-Foundation#10485 from hzi-braunschweig/reve…
Browse files Browse the repository at this point in the history
…rt-10383-bugfix-10343-missing-validations-via-api

Revert "Bugfix 10343 missing validations via api"
  • Loading branch information
JonasCir authored Sep 29, 2022
2 parents 77acbd0 + e6a95ef commit e37915d
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

Expand Down Expand Up @@ -137,8 +137,8 @@ public class EventDto extends SormasToSormasShareableDto {
@S2SIgnoreProperty(configProperty = SormasToSormasConfig.SORMAS2SORMAS_IGNORE_EXTERNAL_TOKEN)
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
private String externalToken;
@NotEmpty(message = Validations.validEventTitle)
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
@NotBlank(message = Validations.requiredField)
private String eventTitle;
@Required
@Size(max = FieldConstraints.CHARACTER_LIMIT_BIG, message = Validations.textTooLong)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import de.symeda.sormas.api.ImportIgnore;
Expand Down Expand Up @@ -109,7 +108,6 @@ public class SampleDto extends SormasToSormasShareableDto {
private SampleMaterial sampleMaterial;
@SensitiveData
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
@NotBlank(message = Validations.requiredField)
private String sampleMaterialText;
@Required
private SamplePurpose samplePurpose;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import java.util.List;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import de.symeda.sormas.api.Disease;
Expand Down Expand Up @@ -105,7 +104,6 @@ public class TravelEntryDto extends PseudonymizableDto {
private PointOfEntryReferenceDto pointOfEntry;
@SensitiveData
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
@NotBlank(message = Validations.requiredField)
private String pointOfEntryDetails;
@EmbeddedPersonalData
private CaseReferenceDto resultingCase;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,Sample,Sample,Sample,Sample,Sample,Sample,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,Sample,Sample,Sample,Sample,Sample,Sample,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest
externalID,disease,person.firstName,person.lastName,person.sex,person.approximateAge,person.approximateAgeType,person.presentCondition,person.phone,person.address.city,epidNumber,reportDate,responsibleRegion,responsibleDistrict,responsibleCommunity,healthFacility,hospitalization.admittedToHealthFacility,symptoms.fever,epiData.contactWithSourceCaseKnown,facilityType,sampleDateTime,reportDateTime,sampleMaterial,sampleMaterialText,samplePurpose,lab,testDateTime,testedDisease,testType,lab,testResult,testResultVerified,sampleDateTime,reportDateTime,sampleMaterial,sampleMaterialText,samplePurpose,lab,testDateTime,testedDisease,testType,lab,testResult,testResultVerified,testDateTime,testedDisease,testType,lab,testResult,testResultVerified
case1,CORONAVIRUS,Import Test,One,MALE,18,YEARS,ALIVE,12345,One City,ABC-DEF-GHI-19-1,11/20/2018,Region,District,Community,Facility,NO,YES,YES,HOSPITAL,,,,,,,11/20/2018,CORONAVIRUS,ANTIBODY_DETECTION,Lab,POSITIVE,true
case2,CORONAVIRUS,Import Test,Two,MALE,19,YEARS,ALIVE,12345,One City,ABC-DEF-GHI-19-2,11/21/2018,Region,District,Community,Facility,NO,YES,YES,HOSPITAL,11/20/2018,11/20/2018,BLOOD,MATERIALTEXT,INTERNAL,Lab,11/20/2018,CORONAVIRUS,ANTIBODY_DETECTION,Lab,POSITIVE,true
case3,CORONAVIRUS,Import Test,Three,MALE,20,YEARS,ALIVE,12345,One City,ABC-DEF-GHI-19-3,11/22/2018,Region,District,Community,Facility,NO,YES,YES,HOSPITAL,11/19/2018,11/20/2018,BLOOD,MATERIALTEXT,INTERNAL,Lab,11/20/2018,CORONAVIRUS,ANTIBODY_DETECTION,Lab,POSITIVE,true,11/20/2018,11/20/2018,STOOL,MATERIALTEXT,INTERNAL,Lab,11/20/2018,CORONAVIRUS,ANTIGEN_DETECTION,Lab,PENDING,true,11/20/2018,CORONAVIRUS,RAPID_TEST,Lab,NEGATIVE,true
CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,Sample,Sample,Sample,Sample,Sample,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,Sample,Sample,Sample,Sample,Sample,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest,PathogenTest
externalID,disease,person.firstName,person.lastName,person.sex,person.approximateAge,person.approximateAgeType,person.presentCondition,person.phone,person.address.city,epidNumber,reportDate,responsibleRegion,responsibleDistrict,responsibleCommunity,healthFacility,hospitalization.admittedToHealthFacility,symptoms.fever,epiData.contactWithSourceCaseKnown,facilityType,sampleDateTime,reportDateTime,sampleMaterial,samplePurpose,lab,testDateTime,testedDisease,testType,lab,testResult,testResultVerified,sampleDateTime,reportDateTime,sampleMaterial,samplePurpose,lab,testDateTime,testedDisease,testType,lab,testResult,testResultVerified,testDateTime,testedDisease,testType,lab,testResult,testResultVerified
case1,CORONAVIRUS,Import Test,One,MALE,18,YEARS,ALIVE,12345,One City,ABC-DEF-GHI-19-1,11/20/2018,Region,District,Community,Facility,NO,YES,YES,HOSPITAL,,,,,,11/20/2018,CORONAVIRUS,ANTIBODY_DETECTION,Lab,POSITIVE,true
case2,CORONAVIRUS,Import Test,Two,MALE,19,YEARS,ALIVE,12345,One City,ABC-DEF-GHI-19-2,11/21/2018,Region,District,Community,Facility,NO,YES,YES,HOSPITAL,11/20/2018,11/20/2018,BLOOD,INTERNAL,Lab,11/20/2018,CORONAVIRUS,ANTIBODY_DETECTION,Lab,POSITIVE,true
case3,CORONAVIRUS,Import Test,Three,MALE,20,YEARS,ALIVE,12345,One City,ABC-DEF-GHI-19-3,11/22/2018,Region,District,Community,Facility,NO,YES,YES,HOSPITAL,11/19/2018,11/20/2018,BLOOD,INTERNAL,Lab,11/20/2018,CORONAVIRUS,ANTIBODY_DETECTION,Lab,POSITIVE,true,11/20/2018,11/20/2018,STOOL,INTERNAL,Lab,11/20/2018,CORONAVIRUS,ANTIGEN_DETECTION,Lab,PENDING,true,11/20/2018,CORONAVIRUS,RAPID_TEST,Lab,NEGATIVE,true
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample
externalID,disease,person.firstName,person.lastName,person.sex,person.approximateAge,person.approximateAgeType,person.presentCondition,person.phone,person.address.city,epidNumber,reportDate,responsibleRegion,responsibleDistrict,responsibleCommunity,healthFacility,hospitalization.admittedToHealthFacility,symptoms.fever,epiData.contactWithSourceCaseKnown,facilityType,sampleDateTime,reportDateTime,sampleMaterial,sampleMaterialText,samplePurpose,lab,sampleDateTime,reportDateTime,sampleMaterial,sampleMaterialText,samplePurpose,lab
CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,CaseData,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample,Sample
externalID,disease,person.firstName,person.lastName,person.sex,person.approximateAge,person.approximateAgeType,person.presentCondition,person.phone,person.address.city,epidNumber,reportDate,responsibleRegion,responsibleDistrict,responsibleCommunity,healthFacility,hospitalization.admittedToHealthFacility,symptoms.fever,epiData.contactWithSourceCaseKnown,facilityType,sampleDateTime,reportDateTime,sampleMaterial,samplePurpose,lab,sampleDateTime,reportDateTime,sampleMaterial,samplePurpose,lab
case1,CORONAVIRUS,Import Test,One,MALE,18,YEARS,ALIVE,12345,One City,ABC-DEF-GHI-19-1,11/20/2018,Region,District,Community,Facility,NO,YES,YES,HOSPITAL
case2,CORONAVIRUS,Import Test,Two,MALE,19,YEARS,ALIVE,12345,One City,ABC-DEF-GHI-19-2,11/21/2018,Region,District,Community,Facility,NO,YES,YES,HOSPITAL,11/20/2018,11/20/2018,BLOOD,MATERIALTEXT,INTERNAL,Lab
case3,CORONAVIRUS,Import Test,Three,MALE,20,YEARS,ALIVE,12345,One City,ABC-DEF-GHI-19-3,11/22/2018,Region,District,Community,Facility,NO,YES,YES,HOSPITAL,11/19/2018,11/20/2018,BLOOD,MATERIALTEXT,INTERNAL,Lab,11/20/2018,11/20/2018,STOOL,MATERIALTEXT,INTERNAL,Lab
case2,CORONAVIRUS,Import Test,Two,MALE,19,YEARS,ALIVE,12345,One City,ABC-DEF-GHI-19-2,11/21/2018,Region,District,Community,Facility,NO,YES,YES,HOSPITAL,11/20/2018,11/20/2018,BLOOD,INTERNAL,Lab
case3,CORONAVIRUS,Import Test,Three,MALE,20,YEARS,ALIVE,12345,One City,ABC-DEF-GHI-19-3,11/22/2018,Region,District,Community,Facility,NO,YES,YES,HOSPITAL,11/19/2018,11/20/2018,BLOOD,INTERNAL,Lab,11/20/2018,11/20/2018,STOOL,INTERNAL,Lab
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Nachname,Vorname,Geschlecht,Geburtsdatum,Tel. persönlich,Tel. weitere,E-Mail Adresse,disease,responsibleRegion,responsibleDistrict,responsibleCommunity,pointOfEntryRegion,pointOfEntryDistrict,pointOfEntry,pointOfEntryDetails,Einreisedatum
Lastname,Firstname,male,01.04.1980,1234567890,12341234,[email protected],CORONAVIRUS,,,,,,,POEDETAILS,01.04.2021
Lastname,Firstname,male,01.04.1980,1234567890,12341234,[email protected],CORONAVIRUS,,,,,,,,01.04.2021
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Nachname,Vorname,Geschlecht,Geburtsdatum,Tel. persönlich,Tel. weitere,E-Mail Adresse,disease,responsibleRegion,responsibleDistrict,responsibleCommunity,pointOfEntryRegion,pointOfEntryDistrict,pointOfEntry,pointOfEntryDetails,Einreisedatum
Lastname,Firstname,male,01.04.1980,1234567890,12341234,[email protected],CORONAVIRUS,Region,District,,,,POE,POEDETAILS,01.04.2021
Lastname,Firstname,male,01.04.1980,1234567890,12341234,[email protected],CORONAVIRUS,Region,District,,,,POE,,01.04.2021
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Nachname Vorname Geschlecht Geburtsdatum Tel. persönlich Tel. weitere E-Mail Adresse disease responsibleRegion responsibleDistrict responsibleCommunity pointOfEntryRegion pointOfEntryDistrict pointOfEntry pointOfEntryDetails Einreisedatum
Lastname Firstname male 01.04.1980 1234567890 12341234 [email protected] CORONAVIRUS Region District POE POEDETAILS 01.04.2021
Lastname Firstname male 01.04.1980 1234567890 12341234 [email protected] CORONAVIRUS Region District POE 01.04.2021

This file was deleted.

0 comments on commit e37915d

Please sign in to comment.