aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala
diff options
context:
space:
mode:
authorKseniya Tomskikh <ktomskih@datamonsters.co>2017-10-18 15:00:26 +0700
committerKseniya Tomskikh <ktomskih@datamonsters.co>2017-10-19 13:02:44 +0700
commit61d03bffcb6000268bb600d5336fb490056837f9 (patch)
treedbad0340d28dbe5835c80cf75f93d142a5327578 /src/main/scala/xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala
parent0c8a7c3f1920e38a0606de91be5793c4f2a1d40a (diff)
downloadrest-query-61d03bffcb6000268bb600d5336fb490056837f9.tar.gz
rest-query-61d03bffcb6000268bb600d5336fb490056837f9.tar.bz2
rest-query-61d03bffcb6000268bb600d5336fb490056837f9.zip
Created list response for each entity
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala')
-rw-r--r--src/main/scala/xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala45
1 files changed, 22 insertions, 23 deletions
diff --git a/src/main/scala/xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala b/src/main/scala/xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala
index d2e70f2..8cff038 100644
--- a/src/main/scala/xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala
+++ b/src/main/scala/xyz/driver/pdsuicommon/utils/CustomSwaggerJsonFormats.scala
@@ -6,14 +6,14 @@ import io.swagger.models.properties.Property
import spray.json.JsValue
import xyz.driver.pdsuicommon.domain.{LongId, StringId, UuidId}
import xyz.driver.pdsuidomain.entities._
-import xyz.driver.pdsuidomain.formats.json.sprayformats.ListResponse._
+import xyz.driver.pdsuidomain.formats.json.sprayformats.listresponse._
import xyz.driver.core.swagger.CustomSwaggerJsonConverter._
import xyz.driver.entities.patient.CancerType
import xyz.driver.pdsuicommon.concurrent.BridgeUploadQueue
+import xyz.driver.pdsuidomain.ListResponse._
import xyz.driver.pdsuidomain.entities.export.patient.ExportPatientWithLabels
import xyz.driver.pdsuidomain.entities.export.trial.ExportTrialWithLabels
import xyz.driver.pdsuidomain.fakes.entities.common
-import xyz.driver.pdsuidomain.formats.json.sprayformats.ListResponse
import xyz.driver.pdsuidomain.formats.json.sprayformats.bridgeuploadqueue._
import xyz.driver.pdsuidomain.formats.json.sprayformats.record._
import xyz.driver.pdsuidomain.formats.json.sprayformats.document._
@@ -130,32 +130,31 @@ object CustomSwaggerJsonFormats {
) ++ customCommonProperties
val customTreatmentMatchingObjectsExamples = immutable.Map[Class[_], JsValue](
- classOf[Patient] -> patientWriter.write(nextPatient()),
- classOf[RichPatientLabel] -> richPatientLabelWriter.write(nextRichPatientLabel()),
- classOf[PatientLabel] -> patientLabelDefiningCriteriaWriter.write(nextPatientLabel()),
- classOf[RichPatientCriterion] -> patientCriterionWriter.write(nextRichPatientCriterion()),
- classOf[DraftPatientCriterion] -> draftPatientCriterionFormat.write(nextDraftPatientCriterion()),
- classOf[PatientLabelEvidenceView] -> patientLabelEvidenceWriter.write(nextPatientLabelEvidenceView()),
- classOf[RichPatientEligibleTrial] -> patientEligibleTrialWriter.write(nextRichPatientEligibleTrial()),
- classOf[PatientHypothesis] -> patientHypothesisWriter.write(nextPatientHypothesis()),
- classOf[RichPatientHypothesis] -> richPatientHypothesisWriter.write(nextRichPatientHypothesis()),
- classOf[PatientHistory] -> patientHistoryFormat.write(nextPatientHistory()),
- classOf[PatientIssue] -> patientIssueWriter.write(nextPatientIssue()),
- classOf[ListResponse[Patient]] -> listResponseWriter[Patient].write(nextPatientListResponse()),
- classOf[ListResponse[PatientLabel]] -> listResponseWriter[PatientLabel].write(nextPatientLabelListResponse()),
- classOf[ListResponse[RichPatientLabel]] -> listResponseWriter[RichPatientLabel].write(
+ classOf[Patient] -> patientWriter.write(nextPatient()),
+ classOf[RichPatientLabel] -> richPatientLabelWriter.write(nextRichPatientLabel()),
+ classOf[PatientLabel] -> patientLabelDefiningCriteriaWriter.write(nextPatientLabel()),
+ classOf[RichPatientCriterion] -> patientCriterionWriter.write(nextRichPatientCriterion()),
+ classOf[DraftPatientCriterion] -> draftPatientCriterionFormat.write(nextDraftPatientCriterion()),
+ classOf[PatientLabelEvidenceView] -> patientLabelEvidenceWriter.write(nextPatientLabelEvidenceView()),
+ classOf[RichPatientEligibleTrial] -> patientEligibleTrialWriter.write(nextRichPatientEligibleTrial()),
+ classOf[PatientHypothesis] -> patientHypothesisWriter.write(nextPatientHypothesis()),
+ classOf[RichPatientHypothesis] -> richPatientHypothesisWriter.write(nextRichPatientHypothesis()),
+ classOf[PatientHistory] -> patientHistoryFormat.write(nextPatientHistory()),
+ classOf[PatientIssue] -> patientIssueWriter.write(nextPatientIssue()),
+ classOf[PatientListResponse] -> listResponseWriter[Patient].write(nextPatientListResponse()),
+ classOf[PatientLabelListResponse] -> listResponseWriter[PatientLabel].write(nextPatientLabelListResponse()),
+ classOf[RichPatientLabelListResponse] -> listResponseWriter[RichPatientLabel].write(
nextRichPatientLabelListResponse()),
- classOf[ListResponse[RichPatientCriterion]] -> listResponseWriter[RichPatientCriterion].write(
+ classOf[RichPatientCriterionListResponse] -> listResponseWriter[RichPatientCriterion].write(
nextRichPatientCriterionListResponse()),
- classOf[ListResponse[PatientLabelEvidenceView]] -> listResponseWriter[PatientLabelEvidenceView].write(
+ classOf[PatientLabelEvidenceViewListResponse] -> listResponseWriter[PatientLabelEvidenceView].write(
nextPatientLabelEvidenceViewListResponse()),
- classOf[ListResponse[RichPatientEligibleTrial]] -> listResponseWriter[RichPatientEligibleTrial].write(
+ classOf[RichPatientEligibleTrialListResponse] -> listResponseWriter[RichPatientEligibleTrial].write(
nextRichPatientEligibleTrialListResponse()),
- classOf[ListResponse[RichPatientHypothesis]] -> listResponseWriter[RichPatientHypothesis].write(
+ classOf[RichPatientHypothesisListResponse] -> listResponseWriter[RichPatientHypothesis].write(
nextRichPatientHypothesisListResponse()),
- classOf[ListResponse[PatientIssue]] -> listResponseWriter[PatientIssue].write(nextPatientIssuesListResponse()),
- classOf[ListResponse[PatientHistory]] -> listResponseWriter[PatientHistory].write(
- nextPatientHistoryListResponse())
+ classOf[PatientIssueListResponse] -> listResponseWriter[PatientIssue].write(nextPatientIssuesListResponse()),
+ classOf[PatientHistoryListResponse] -> listResponseWriter[PatientHistory].write(nextPatientHistoryListResponse())
) ++ customCommonObjectsExamples
}