RED-8339: Updated OpenApi Specs
This commit is contained in:
parent
9660ac765b
commit
f3a7d40ff9
@ -1,62 +0,0 @@
|
||||
//package com.iqser.red.service.peristence.v1.server.integration.tests;
|
||||
//
|
||||
//import static com.mongodb.assertions.Assertions.assertNotNull;
|
||||
//import static com.mongodb.assertions.Assertions.assertTrue;
|
||||
//import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
//
|
||||
//import java.util.List;
|
||||
//import java.util.Optional;
|
||||
//
|
||||
//import org.junit.jupiter.api.Test;
|
||||
//import org.springframework.core.io.ClassPathResource;
|
||||
//
|
||||
//import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
//import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
//import com.iqser.red.service.persistence.service.v1.api.shared.mongo.document.ComponentDocument;
|
||||
//import com.iqser.red.service.persistence.service.v1.api.shared.mongo.mapper.ComponentLogDocumentMapper;
|
||||
//
|
||||
//import lombok.SneakyThrows;
|
||||
//
|
||||
//public class ComponentLogDocumentMapperTest {
|
||||
//
|
||||
// private final ComponentLogDocumentMapper mapper = ComponentLogDocumentMapper.INSTANCE;
|
||||
//
|
||||
// private final String COMPONENT_LOG = "files/componentlog/componentLogExample.json";
|
||||
// private final String COMPONENT_OVERRIDE = "files/componentlog/componentOverrideExample.json";
|
||||
// private static final String TEST_DOSSIER_ID = "91ce8e90-9aec-473c-b8c3-cbe16443ad34";
|
||||
// private static final String TEST_FILE_ID = "b2cbdd4dca0aa1aa0ebbfc5cc1462df0";
|
||||
//
|
||||
//
|
||||
// @Test
|
||||
// @SneakyThrows
|
||||
// public void ComponentOverrideMapper() {
|
||||
//
|
||||
// var overrideFile = new ClassPathResource(String.format(COMPONENT_OVERRIDE));
|
||||
// ObjectMapper objectMapper = new ObjectMapper();
|
||||
// objectMapper.registerModule(new JavaTimeModule());
|
||||
//
|
||||
// ComponentsOverrides componentsOverridesBefore = objectMapper.readValue(overrideFile.getInputStream(), ComponentsOverrides.class);
|
||||
//
|
||||
// List<ComponentDocument> componentDocument = mapper.toComponentOverrideDocuments(componentsOverridesBefore, TEST_DOSSIER_ID, TEST_FILE_ID);
|
||||
//
|
||||
// assertEquals(componentDocument.get(0).getDossierId(), TEST_DOSSIER_ID);
|
||||
// assertEquals(componentDocument.get(0).getFileId(), TEST_FILE_ID);
|
||||
// assertEquals(componentDocument.get(0).getId(), mapper.getComponentId(TEST_DOSSIER_ID, TEST_FILE_ID, componentDocument.get(0).getName()));
|
||||
//
|
||||
// Optional<ComponentValueDocument> optionalComponentValueDocument = componentDocument.get(0).getOverrideValues()
|
||||
// .stream()
|
||||
// .findFirst();
|
||||
//
|
||||
// assertTrue(optionalComponentValueDocument.isPresent());
|
||||
// assertNotNull(optionalComponentValueDocument.get().getValueId());
|
||||
// assertNotNull(optionalComponentValueDocument.get().getComponentOverrideId());
|
||||
//
|
||||
// ComponentsOverrides componentsOverridesAfter = mapper.fromComponentOverrideDocument(componentDocument.get(0));
|
||||
//
|
||||
// assertEquals(mapper.buildComponentOverrideMap(componentDocument.get(0).getName(),
|
||||
// componentsOverridesBefore.getComponentOverrides()
|
||||
// .get(componentDocument.get(0).getName())), componentsOverridesAfter);
|
||||
//
|
||||
// }
|
||||
//
|
||||
//}
|
||||
@ -1,266 +0,0 @@
|
||||
{
|
||||
"analysisNumber": 3,
|
||||
"componentRulesVersion": 1,
|
||||
"componentLogEntries": [
|
||||
{
|
||||
"name": "Study_Title",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "First found value of type or else ''",
|
||||
"componentRuleId": "StudyTitle.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Performing_Laboratory",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "fallback",
|
||||
"componentRuleId": "PerformingLaboratory.0.2",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Report_Number",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "First found value of type or else ''",
|
||||
"componentRuleId": "ReportNumber.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "GLP_Study",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "No",
|
||||
"originalValue": "No",
|
||||
"valueDescription": "Yes if present, No if not",
|
||||
"componentRuleId": "GLPStudy.1.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Test_Guidelines_2",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "Joining all values of type with ', '",
|
||||
"componentRuleId": "TestGuideline.2.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Experimental_Starting_Date",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "Convert values of type '' to dd/MM/yyyy joined with ', '",
|
||||
"componentRuleId": "StartDate.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Experimental_Completion_Date",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "Convert values of type '' to dd/MM/yyyy joined with ', '",
|
||||
"componentRuleId": "CompletionDate.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Certificate_of_Analysis_Batch_Identification",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "Joining all unique values of type with ', '",
|
||||
"componentRuleId": "AnalysisCertificate.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Species",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "First found value of type or else ''",
|
||||
"componentRuleId": "Species.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Strain",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "First found value of type or else ''",
|
||||
"componentRuleId": "Strain.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Doses_mg_per_kg_bw",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "Joining all values of type with ' '",
|
||||
"componentRuleId": "Necropsy.1.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mortality_Statement",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "Joining all values of type with ' '",
|
||||
"componentRuleId": "MortalityStatement.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Weight_Behavior_Changes",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "Joining all values of type with '\n'",
|
||||
"componentRuleId": "WeightBehavior.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Necropsy_Findings",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "Joining all values of type with ' '",
|
||||
"componentRuleId": "Necropsy.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Deviation_from_the_Guideline",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "Joining all values of type with '\n'",
|
||||
"componentRuleId": "GuidelineDeviation.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Conclusion_LD50_Greater_than",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "No entity of type 'ld50_greater' found",
|
||||
"componentRuleId": "Conclusion.1.1",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Conclusion_LD50_mg_per_kg",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "Joining all unique values of type with ', '",
|
||||
"componentRuleId": "Conclusion.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Conclusion_Minimum_Confidence",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "Joining all unique values of type with ', '",
|
||||
"componentRuleId": "Conclusion.2.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Conclusion_Maximum_Confidence",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "Joining all unique values of type with ', '",
|
||||
"componentRuleId": "Conclusion.3.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Study_Conclusion",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": null,
|
||||
"value": "",
|
||||
"originalValue": "",
|
||||
"valueDescription": "Joining all values of type with ' '",
|
||||
"componentRuleId": "StudyConclusion.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,244 +0,0 @@
|
||||
{
|
||||
"componentOverrides": [
|
||||
{
|
||||
"name": "Study_Title",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "1",
|
||||
"value": "",
|
||||
"valueDescription": "First found value of type or else ''",
|
||||
"componentRuleId": "StudyTitle.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Performing_Laboratory",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "2",
|
||||
"value": "",
|
||||
"valueDescription": "fallback",
|
||||
"componentRuleId": "PerformingLaboratory.0.2",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Report_Number",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "3",
|
||||
"value": "",
|
||||
"valueDescription": "First found value of type or else ''",
|
||||
"componentRuleId": "ReportNumber.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "GLP_Study",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "4",
|
||||
"value": "No",
|
||||
"valueDescription": "Yes if present, No if not",
|
||||
"componentRuleId": "GLPStudy.1.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Test_Guidelines_2",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "5",
|
||||
"value": "",
|
||||
"valueDescription": "Joining all values of type with ', '",
|
||||
"componentRuleId": "TestGuideline.2.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Experimental_Starting_Date",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "6",
|
||||
"value": "",
|
||||
"valueDescription": "Convert values of type '' to dd/MM/yyyy joined with ', '",
|
||||
"componentRuleId": "StartDate.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Experimental_Completion_Date",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "7",
|
||||
"value": "",
|
||||
"valueDescription": "Convert values of type '' to dd/MM/yyyy joined with ', '",
|
||||
"componentRuleId": "CompletionDate.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Certificate_of_Analysis_Batch_Identification",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "8",
|
||||
"value": "",
|
||||
"valueDescription": "Joining all unique values of type with ', '",
|
||||
"componentRuleId": "AnalysisCertificate.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Species",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "9",
|
||||
"value": "",
|
||||
"valueDescription": "First found value of type or else ''",
|
||||
"componentRuleId": "Species.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Strain",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "10",
|
||||
"value": "",
|
||||
"valueDescription": "First found value of type or else ''",
|
||||
"componentRuleId": "Strain.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Doses_mg_per_kg_bw",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "11",
|
||||
"value": "",
|
||||
"valueDescription": "Joining all values of type with ' '",
|
||||
"componentRuleId": "Necropsy.1.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Mortality_Statement",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "12",
|
||||
"value": "",
|
||||
"valueDescription": "Joining all values of type with ' '",
|
||||
"componentRuleId": "MortalityStatement.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Weight_Behavior_Changes",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "13",
|
||||
"value": "",
|
||||
"valueDescription": "Joining all values of type with '\n'",
|
||||
"componentRuleId": "WeightBehavior.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Necropsy_Findings",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "14",
|
||||
"value": "",
|
||||
"valueDescription": "Joining all values of type with ' '",
|
||||
"componentRuleId": "Necropsy.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Deviation_from_the_Guideline",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "15",
|
||||
"value": "",
|
||||
"valueDescription": "Joining all values of type with '\n'",
|
||||
"componentRuleId": "GuidelineDeviation.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Conclusion_LD50_Greater_than",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "16",
|
||||
"value": "",
|
||||
"valueDescription": "No entity of type 'ld50_greater' found",
|
||||
"componentRuleId": "Conclusion.1.1",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Conclusion_LD50_mg_per_kg",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "17",
|
||||
"value": "",
|
||||
"valueDescription": "Joining all unique values of type with ', '",
|
||||
"componentRuleId": "Conclusion.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Conclusion_Minimum_Confidence",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "18",
|
||||
"value": "",
|
||||
"valueDescription": "Joining all unique values of type with ', '",
|
||||
"componentRuleId": "Conclusion.2.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Conclusion_Maximum_Confidence",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "19",
|
||||
"value": "",
|
||||
"valueDescription": "Joining all unique values of type with ', '",
|
||||
"componentRuleId": "Conclusion.3.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Study_Conclusion",
|
||||
"componentValues": [
|
||||
{
|
||||
"valueId": "20",
|
||||
"value": "",
|
||||
"valueDescription": "Joining all values of type with ' '",
|
||||
"componentRuleId": "StudyConclusion.0.0",
|
||||
"componentLogEntityReferences": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user