From 9974f958da7b1d229572e6df68126bfc66b8e783 Mon Sep 17 00:00:00 2001 From: Christian Busse Date: Mon, 19 Feb 2024 03:03:45 +0100 Subject: [PATCH] Add /reactivity endpoint to ADC API --- specs/adc-api-openapi3.yaml | 95 ++++++++++++++++++++++++++++++ specs/adc-api.yaml | 114 ++++++++++++++++++++++++++++++++++++ 2 files changed, 209 insertions(+) diff --git a/specs/adc-api-openapi3.yaml b/specs/adc-api-openapi3.yaml index 2d6b72674..9dc12cad5 100644 --- a/specs/adc-api-openapi3.yaml +++ b/specs/adc-api-openapi3.yaml @@ -365,6 +365,12 @@ components: items: $ref: 'https://raw.githubusercontent.com/airr-community/airr-standards/v1.4.1/specs/airr-schema-openapi3.yaml#/CellExpression' + # list of cell reactivity features + reactivity_list: + type: array + items: + $ref: 'https://raw.githubusercontent.com/airr-community/airr-standards/v1.4.1/specs/airr-schema-openapi3.yaml#/CellReactivity' + # list of receptor extension fields receptor_extension: description: The extended Receptor object with additional query fields for the ADC. @@ -459,6 +465,26 @@ components: Facet: $ref: '#/components/schemas/facet_list' + # The response object /reactivity/{reactivity_id} endpoint + reactivity_id_response: + type: object + properties: + Info: + $ref: '#/components/schemas/info_object' + CellReactivity: + $ref: '#/components/schemas/reactivity_list' + + # The response object for the /reactivity endpoint + reactivity_response: + type: object + properties: + Info: + $ref: '#/components/schemas/info_object' + CellReactivity: + $ref: '#/components/schemas/reactivity_list' + Facet: + $ref: '#/components/schemas/facet_list' + # The response object /receptor endpoint receptor_response: type: object @@ -870,6 +896,75 @@ paths: schema: $ref: '#/components/schemas/error_response' + /reactivity/{reactivity_id}: + x-swagger-router-controller: reactivity + get: + description: > + Returns an reactivity property based upon its identifier. + tags: + - reactivity + parameters: + - name: reactivity_id + in: path + description: ID of reactivity property to return + required: true + schema: + type: string + operationId: get_reactivity + responses: + '200': + description: > + A successful call returns the reactivity property data. + content: + application/json: + schema: + $ref: '#/components/schemas/reactivity_id_response' + '400': + description: Invalid request + content: + application/json: + schema: + $ref: '#/components/schemas/error_response' + '500': + description: Server error + content: + application/json: + schema: + $ref: '#/components/schemas/error_response' + + /reactivity: + post: + description: > + This query service returns gene reactivity data. + operationId: query_reactivity + tags: + - reactivity + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/query_object' + responses: + '200': + description: > + A successful call returns an array of gene reactivity data. + content: + application/json: + schema: + $ref: '#/components/schemas/reactivity_response' + '400': + description: Invalid request + content: + application/json: + schema: + $ref: '#/components/schemas/error_response' + '500': + description: Server error + content: + application/json: + schema: + $ref: '#/components/schemas/error_response' + /receptor/{receptor_id}: get: description: > diff --git a/specs/adc-api.yaml b/specs/adc-api.yaml index 0faa7a720..a48c1152f 100644 --- a/specs/adc-api.yaml +++ b/specs/adc-api.yaml @@ -410,6 +410,32 @@ definitions: Facet: $ref: '#/definitions/facet_list' + # list of reactivity annotations + reactivity_list: + type: array + items: + $ref: 'https://raw.githubusercontent.com/airr-community/airr-standards/v1.4.1/specs/airr-schema.yaml#/CellReactivity' + + # The response object /reactivity/{reactivity_id} endpoint + reactivity_id_response: + type: object + properties: + Info: + $ref: '#/definitions/info_object' + CellReactivity: + $ref: '#/definitions/reactivity_list' + + # The response object /reactivity endpoint + reactivity_response: + type: object + properties: + Info: + $ref: '#/definitions/info_object' + CellReactivity: + $ref: '#/definitions/reactivity_list' + Facet: + $ref: '#/definitions/facet_list' + # list of receptor extension fields receptor_extension: description: The extended Receptor object with additional query fields for the ADC. @@ -949,6 +975,94 @@ paths: schema: $ref: '#/definitions/error_response' + /reactivity/{reactivity_id}: + x-swagger-router-controller: reactivity + get: + description: > + Returns an reactivity property based upon its identifier. + tags: + - reactivity + consumes: + - application/x-www-form-urlencoded + - application/json + - application/octet-stream + produces: + - application/json + parameters: + - name: reactivity_id + in: path + description: ID of reactivity property to return + required: true + type: string + operationId: getReactivity + responses: + '200': + description: > + A successful call returns the reactivity property data. + schema: + $ref: '#/definitions/reactivity_id_response' + '400': + description: Invalid request + schema: + $ref: '#/definitions/error_response' + '500': + description: Server error + schema: + $ref: '#/definitions/error_response' + + /reactivity: + x-swagger-router-controller: reactivity + post: + description: > + This query service returns cell reactivity data. + tags: + - reactivity + parameters: + - in: body + name: data + schema: + type: object + properties: + filters: + type: object + format: + type: string + default: json + enum: + - json + - tsv + fields: + type: array + items: + type: string + size: + type: integer + from: + type: integer + include_fields: + type: string + enum: + - miairr + - airr-core + - airr-schema + facets: + type: string + operationId: queryReactivity + responses: + '200': + description: > + A successful call returns an array of cell reactivity data. + schema: + $ref: '#/definitions/reactivity_response' + '400': + description: Invalid request + schema: + $ref: '#/definitions/error_response' + '500': + description: Server error + schema: + $ref: '#/definitions/error_response' + /receptor/{receptor_id}: x-swagger-router-controller: receptor get: