From 9cbf1cbe8a33a54e45fe8ffe1519b303cdacd73c Mon Sep 17 00:00:00 2001 From: Nina Bernick <40436239+ninabernick@users.noreply.github.com> Date: Thu, 25 Apr 2024 09:58:08 -0700 Subject: [PATCH] fix: add required types to admin samples response (#336) Co-authored-by: Nina Bernick --- json-schemas/adminSamplesResponse.json | 26 ++++++++++++++++--- sample-responses/adminSamples.json | 1 + .../__snapshots__/UnifiedSchema.test.ts.snap | 23 ++++++++-------- 3 files changed, 36 insertions(+), 14 deletions(-) diff --git a/json-schemas/adminSamplesResponse.json b/json-schemas/adminSamplesResponse.json index 3fca0c24..314e32ec 100644 --- a/json-schemas/adminSamplesResponse.json +++ b/json-schemas/adminSamplesResponse.json @@ -62,7 +62,13 @@ "namespace": { "type": "string" } - } + }, + "required": [ + "id", + "protocol", + "path", + "namespace" + ] }, "r2File": { "type": "object", @@ -79,7 +85,13 @@ "namespace": { "type": "string" } - } + }, + "required": [ + "id", + "protocol", + "path", + "namespace" + ] }, "taxon": { "type": "object", @@ -107,10 +119,18 @@ "namespace": { "type": "string" }, + "protocol": { + "type": "string" + }, "id": { "type": "string" } - } + }, + "required": [ + "path", + "namespace", + "id" + ] } } }, diff --git a/sample-responses/adminSamples.json b/sample-responses/adminSamples.json index 0ff5c856..7dcdec3d 100644 --- a/sample-responses/adminSamples.json +++ b/sample-responses/adminSamples.json @@ -35,6 +35,7 @@ "primerFile": { "file": { "path": "samples/1224/33171/fastqs/Primer_K.bed", + "protocol": "s3", "namespace": "idseq-samples-staging", "id": "397ae4c0-2c88-525a-8f85-0a00e338adf0" } diff --git a/tests/__snapshots__/UnifiedSchema.test.ts.snap b/tests/__snapshots__/UnifiedSchema.test.ts.snap index c9c4da98..6bac6693 100644 --- a/tests/__snapshots__/UnifiedSchema.test.ts.snap +++ b/tests/__snapshots__/UnifiedSchema.test.ts.snap @@ -4759,23 +4759,24 @@ type query_adminSamples_items_sequencingReads_edges_items_node_primerFile { } type query_adminSamples_items_sequencingReads_edges_items_node_primerFile_file { - id: String - namespace: String - path: String + id: String! + namespace: String! + path: String! + protocol: String } type query_adminSamples_items_sequencingReads_edges_items_node_r1File { - id: String - namespace: String - path: String - protocol: String + id: String! + namespace: String! + path: String! + protocol: String! } type query_adminSamples_items_sequencingReads_edges_items_node_r2File { - id: String - namespace: String - path: String - protocol: String + id: String! + namespace: String! + path: String! + protocol: String! } type query_adminSamples_items_sequencingReads_edges_items_node_taxon {