From 82fb432a04746f5460e2326b42b73752e30d76b9 Mon Sep 17 00:00:00 2001 From: Robert Gabriel Macalintal Date: Wed, 9 Oct 2024 13:00:29 -0400 Subject: [PATCH 1/8] Added ngsIndex.yml and linked it to sequence.yml --- schema/ngsIndex.yml | 273 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 273 insertions(+) create mode 100644 schema/ngsIndex.yml diff --git a/schema/ngsIndex.yml b/schema/ngsIndex.yml new file mode 100644 index 0000000..27c522e --- /dev/null +++ b/schema/ngsIndex.yml @@ -0,0 +1,273 @@ +openapi: 3.0.0 +servers: + - description: SwaggerHub API Auto Mocking + url: https://virtserver.swaggerhub.com/AAFC/test/1.0.0 +info: + description: NGS Index schema + version: "1.0.0" + title: NGS Index schema + contact: + email: you@your-company.com + license: + name: Apache 2.0 + url: 'http://www.apache.org/licenses/LICENSE-2.0.html' + +paths: + /v1/ngs-index: + get: + tags: + - NGS Index + summary: get ngs-index + operationId: getNgsIndex + description: By passing in query string, user can get available ngs indexes + parameters: + - in: query + name: filter[rsql] + description: pass an optional search string for looking up the ngs indexes + schema: + type: string + - in: query + name: sort + description: optional sort string, can have sort order such as descending denoted by "-" + schema: + type: string + - in: query + name: page[offset] + description: number of records to skip when paging + schema: + type: integer + format: int32 + - in: query + name: page[limit] + description: maximum number of records to return when paging + schema: + type: integer + format: int32 + minimum: 0 + maximum: 50 + responses: + '200': + description: NGS Indexes satifying the query restrictions + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NgsIndex' + '400': + description: bad input parameter + '404': + description: ngs indexes not found + post: + tags: + - NGS Index + summary: adds an ngs-index + operationId: addNgsIndex + description: Adds an ngs-index + responses: + '201': + description: ngs-index created + '400': + description: 'invalid input, object invalid' + '409': + description: An ngs-index already exists + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NewNgsIndex' + description: ngs-index to add + /v1/ngs-index/{Id}: + get: + tags: + - NGS Index + summary: Find ngs-index by ID + description: Returns a single ngs-index + operationId: getNgsIndexById + parameters: + - name: Id + in: path + description: ID of ngs-index to return + required: true + schema: + type: integer + responses: + "200": + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/NgsIndex' + "400": + description: Invalid ID supplied + "404": + description: ngs-index not found + patch: + tags: + - NGS Index + summary: update an ngs-index + operationId: updateNgsIndex + description: update an ngs-index + parameters: + - name: Id + in: path + description: ngs-index id to patch + required: true + schema: + type: integer + responses: + '200': + description: ngs-index updated + '400': + description: 'invalid input, object invalid' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NgsIndex' + description: ngs-index to update + delete: + tags: + - Ngs Index + summary: delete an ngs-index + operationId: deleteNgsIndex + description: delete an ngs-index + parameters: + - name: Id + in: path + description: ngs-index id to delete + required: true + schema: + type: integer + responses: + '200': + description: ngs-index marked as deleted + '400': + description: invalid ID supplied + '404': + description: ngs-index not found + +components: + schemas: + NgsIndex: + type: object + required: + - data + properties: + data: + type: object + required: + - id + properties: + id: + type: string + allOf: + - $ref: '#/components/schemas/CommonNgsIndex' + + NewNgsIndex: + type: object + required: + - data + properties: + data: + type: object + allOf: + - $ref: '#/components/schemas/CommonNgsIndex' + + CommonNgsIndex: + type: object + required: + - type + - attributes + properties: + type: + enum: [ngs-index] + description: The type of data being returned. + attributes: + description: Schema representing the Ngs Index + type: object + required: + - name + properties: + createdBy: + type: string + readOnly: true + description: Authenticated User who created the NGS Index + createdOn: + type: string + format: date-time + readOnly: true + description: Date and time when the NGS Index was created in ISO format + example: 1985-04-12T23:20:50.52Z + name: + type: string + description: NGS Index name + lotNumber: + type: integer + description: Lot number for the created NGS Index + direction: + type: string + description: Forward or Reverse + purification: + type: string + description: The purification standard from the manufacturer + tmCalculated: + type: string + description: Calculated melting point (C°) + dateOrdered: + type: string + description: Date the NGS Index was ordered in YYYY-MM-DD format + example: 1985-04-12 + dateDestroyed: + type: string + description: Date the NGS Index was destroyed in YYYY-MM-DD format + example: 1985-04-12 + application: + type: string + description: The way that the NGS Index was used + reference: + type: string + description: Any reference regarding the NGS Index + supplier: + type: string + description: Name of the company or lab supplying the NGS Index + designedBy: + type: string + desciption: Name of the designer of the NGS Index + stockConcentration: + type: string + description: Stock concentration of the NGS Index + notes: + type: string + description: Any additional notes about the NGS Index + litReference: + type: string + description: Any reference in literature about the NGS Index + primerSequence: + type: string + description: Primer Sequence for the NGS Index + miSeqHiSeqIndexSequence: + type: string + miniSeqNextSeqIndexSequence: + type: string + relationships: + type: object + properties: + indexSet: + type: object + required: + - data + properties: + data: + type: object + required: + - type + - id + properties: + type: + enum: [index-set] + id: + type: string + format: uuid + description: index-set id + example: a600f9da-fcbe-4fef-9ae3-0f131ca05e0c From 9cf85194e81a4be68d8d01844030b3b92f055643 Mon Sep 17 00:00:00 2001 From: Robert Gabriel Macalintal Date: Wed, 9 Oct 2024 13:01:12 -0400 Subject: [PATCH 2/8] Fix - linked ngsIndex to sequence.yml --- schema/sequence.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/schema/sequence.yml b/schema/sequence.yml index d72ad77..daa98a4 100644 --- a/schema/sequence.yml +++ b/schema/sequence.yml @@ -45,3 +45,7 @@ paths: $ref: 'indexSet.yml#/paths/~1v1~1index-set' /v1/index-set/{Id}: $ref: 'indexSet.yml#/paths/~1v1~1index-set~1{Id}' + /v1/ngs-index: + $ref: 'ngsIndex.yml#/paths/~1v1~1ngs-index' + /v1/ngs-index/{Id}: + $ref: 'ngsIndex.yml#/paths/~1v1~1ngs-index~1{Id}' \ No newline at end of file From 930fdb2656e78e3c7caed0de69827d81a6a4754b Mon Sep 17 00:00:00 2001 From: Robert Gabriel Macalintal Date: Wed, 9 Oct 2024 13:39:44 -0400 Subject: [PATCH 3/8] Commit for testing, will be reverted if needed --- schema/ngsIndex.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/schema/ngsIndex.yml b/schema/ngsIndex.yml index 27c522e..352c55c 100644 --- a/schema/ngsIndex.yml +++ b/schema/ngsIndex.yml @@ -231,9 +231,9 @@ components: supplier: type: string description: Name of the company or lab supplying the NGS Index - designedBy: - type: string - desciption: Name of the designer of the NGS Index + # designedBy: + # type: string + # desciption: Name of the designer of the NGS Index stockConcentration: type: string description: Stock concentration of the NGS Index From 3b772bce8e81f1fca094db533cc022f6b8d27bbe Mon Sep 17 00:00:00 2001 From: Robert Gabriel Macalintal Date: Wed, 9 Oct 2024 13:50:18 -0400 Subject: [PATCH 4/8] Revert changes made in previous commit --- schema/ngsIndex.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/schema/ngsIndex.yml b/schema/ngsIndex.yml index 352c55c..27c522e 100644 --- a/schema/ngsIndex.yml +++ b/schema/ngsIndex.yml @@ -231,9 +231,9 @@ components: supplier: type: string description: Name of the company or lab supplying the NGS Index - # designedBy: - # type: string - # desciption: Name of the designer of the NGS Index + designedBy: + type: string + desciption: Name of the designer of the NGS Index stockConcentration: type: string description: Stock concentration of the NGS Index From 7d49a92130df8d5a5eafe02553d6a88ddae60dcb Mon Sep 17 00:00:00 2001 From: Robert Gabriel Macalintal Date: Wed, 9 Oct 2024 15:27:27 -0400 Subject: [PATCH 5/8] Fixed typo in line 236 (desciption -> description) --- schema/ngsIndex.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/schema/ngsIndex.yml b/schema/ngsIndex.yml index 27c522e..d401a14 100644 --- a/schema/ngsIndex.yml +++ b/schema/ngsIndex.yml @@ -231,9 +231,9 @@ components: supplier: type: string description: Name of the company or lab supplying the NGS Index - designedBy: - type: string - desciption: Name of the designer of the NGS Index + definedBy: + type: integer + description: Name of the designer of the NGS Index stockConcentration: type: string description: Stock concentration of the NGS Index From 8178d960844c03398e0761d81a6487f02ca541e3 Mon Sep 17 00:00:00 2001 From: Robert Gabriel Macalintal Date: Wed, 9 Oct 2024 15:32:01 -0400 Subject: [PATCH 6/8] Corrected attribute name --- schema/ngsIndex.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/ngsIndex.yml b/schema/ngsIndex.yml index d401a14..a88bc6b 100644 --- a/schema/ngsIndex.yml +++ b/schema/ngsIndex.yml @@ -231,7 +231,7 @@ components: supplier: type: string description: Name of the company or lab supplying the NGS Index - definedBy: + designedBy: type: integer description: Name of the designer of the NGS Index stockConcentration: From 7f2fe8cc4cd45aaa4e21cb7859e9d61f714b5a42 Mon Sep 17 00:00:00 2001 From: Robert Gabriel Macalintal Date: Wed, 9 Oct 2024 15:38:35 -0400 Subject: [PATCH 7/8] Fixed designedBy attribute data type --- schema/ngsIndex.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/ngsIndex.yml b/schema/ngsIndex.yml index a88bc6b..784a208 100644 --- a/schema/ngsIndex.yml +++ b/schema/ngsIndex.yml @@ -232,7 +232,7 @@ components: type: string description: Name of the company or lab supplying the NGS Index designedBy: - type: integer + type: string description: Name of the designer of the NGS Index stockConcentration: type: string From bb90b02ba0ca177e50ae0da66e637b75b0a80018 Mon Sep 17 00:00:00 2001 From: Robert Gabriel Macalintal Date: Thu, 10 Oct 2024 07:58:48 -0400 Subject: [PATCH 8/8] Added potential fix to reflect NgsIndexDirection enum --- schema/ngsIndex.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/schema/ngsIndex.yml b/schema/ngsIndex.yml index 784a208..304406a 100644 --- a/schema/ngsIndex.yml +++ b/schema/ngsIndex.yml @@ -207,6 +207,7 @@ components: description: Lot number for the created NGS Index direction: type: string + enum: [I5, I7, FORWARD, REVERSE] description: Forward or Reverse purification: type: string