Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /reactivity endpoint to ADC API #755

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add /reactivity endpoint to ADC API
  • Loading branch information
bussec committed Feb 28, 2024
commit 95e8a43fb8f6c212d155c31b58c81c69a9e3c3d1
95 changes: 95 additions & 0 deletions specs/adc-api-openapi3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,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.
Expand Down Expand Up @@ -465,6 +471,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
Expand Down Expand Up @@ -996,6 +1022,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: >
Expand Down
114 changes: 114 additions & 0 deletions specs/adc-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,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.
Expand Down Expand Up @@ -1035,6 +1061,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:
Expand Down