From 2a1bba7d8b5fbc6a2d665c10ffea110bc7d89b46 Mon Sep 17 00:00:00 2001 From: Aleksandr Date: Fri, 13 Oct 2017 14:13:28 +0700 Subject: Added swagger annotations for new entities --- .../xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/scala/xyz/driver/pdsuicommon/utils') diff --git a/src/main/scala/xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala b/src/main/scala/xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala index 6d2a068..b718c1f 100644 --- a/src/main/scala/xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala +++ b/src/main/scala/xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala @@ -7,6 +7,8 @@ import spray.json.JsValue import xyz.driver.pdsuicommon.domain.{LongId, StringId, TextJson, UuidId} import xyz.driver.pdsuidomain.entities._ import xyz.driver.pdsuidomain.formats.json.sprayformats.arm._ +import xyz.driver.pdsuidomain.formats.json.sprayformats.slotarm._ +import xyz.driver.pdsuidomain.formats.json.sprayformats.eligibilityarm._ import xyz.driver.pdsuidomain.formats.json.sprayformats.criterion._ import xyz.driver.pdsuidomain.formats.json.sprayformats.intervention._ import xyz.driver.pdsuidomain.formats.json.sprayformats.hypothesis._ @@ -54,7 +56,10 @@ object CustomSwaggerJsonFormats { classOf[Hypothesis] -> hypothesisFormat.write( xyz.driver.pdsuidomain.fakes.entities.trialcuration.nextHypothesis()), classOf[StudyDesign] -> studyDesignFormat.write( - xyz.driver.pdsuidomain.fakes.entities.trialcuration.nextStudyDesign()) + xyz.driver.pdsuidomain.fakes.entities.trialcuration.nextStudyDesign()), + classOf[EligibilityArmWithDiseases] -> eligibilityArmWithDiseasesWriter.write( + xyz.driver.pdsuidomain.fakes.entities.trialcuration.nextEligibilityArmWithDiseases()), + classOf[SlotArm] -> slotArmFormat.write(xyz.driver.pdsuidomain.fakes.entities.trialcuration.nextSlotArm()) ) // records-processing-service -- cgit v1.2.3 From d96c7fbd36cdfe5d0fba702986ece4d0e1b351ed Mon Sep 17 00:00:00 2001 From: Aleksandr Date: Tue, 17 Oct 2017 16:35:05 +0700 Subject: Code is formatted --- .../pdsuicommon/utils/CustomSwaggerJsonFormats.scala | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/main/scala/xyz/driver/pdsuicommon/utils') diff --git a/src/main/scala/xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala b/src/main/scala/xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala index 55311ac..d2e70f2 100644 --- a/src/main/scala/xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala +++ b/src/main/scala/xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala @@ -65,16 +65,16 @@ object CustomSwaggerJsonFormats { ) ++ customCommonProperties val customTrialCurationObjectsExamples = immutable.Map[Class[_], JsValue]( - classOf[Trial] -> trialWriter.write(nextTrial()), - classOf[Arm] -> armFormat.write(nextArm()), - classOf[TrialHistory] -> trialHistoryFormat.write(nextTrialHistory()), - classOf[TrialIssue] -> trialIssueWriter.write(nextTrialIssue()), - classOf[RichCriterion] -> richCriterionFormat.write(nextRichCriterion()), - classOf[InterventionWithArms] -> interventionFormat.write(nextInterventionWithArms()), - classOf[InterventionType] -> interventionTypeFormat.write(nextInterventionType()), - classOf[Hypothesis] -> hypothesisFormat.write(nextHypothesis()), - classOf[StudyDesign] -> studyDesignFormat.write(nextStudyDesign()), - classOf[ExportTrialWithLabels] -> trialWithLabelsFormat.write(export.nextExportTrialWithLabels()), + classOf[Trial] -> trialWriter.write(nextTrial()), + classOf[Arm] -> armFormat.write(nextArm()), + classOf[TrialHistory] -> trialHistoryFormat.write(nextTrialHistory()), + classOf[TrialIssue] -> trialIssueWriter.write(nextTrialIssue()), + classOf[RichCriterion] -> richCriterionFormat.write(nextRichCriterion()), + classOf[InterventionWithArms] -> interventionFormat.write(nextInterventionWithArms()), + classOf[InterventionType] -> interventionTypeFormat.write(nextInterventionType()), + classOf[Hypothesis] -> hypothesisFormat.write(nextHypothesis()), + classOf[StudyDesign] -> studyDesignFormat.write(nextStudyDesign()), + classOf[ExportTrialWithLabels] -> trialWithLabelsFormat.write(export.nextExportTrialWithLabels()), classOf[EligibilityArmWithDiseases] -> eligibilityArmWithDiseasesWriter.write(nextEligibilityArmWithDiseases()), classOf[SlotArm] -> slotArmFormat.write(nextSlotArm()) ) -- cgit v1.2.3