Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Nov 20, 2024
1 parent 32515d0 commit 5d902e4
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 37 deletions.
102 changes: 66 additions & 36 deletions openapi.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ info:
email: [email protected]
license:
name: Apache-2.0
version: 0.41.3
version: 0.42.0
paths:
/api/v1/genes/clinvar:
get:
Expand Down Expand Up @@ -42,49 +42,27 @@ paths:
/api/v1/genes/info:
get:
tags:
- annos_variant
summary: Query for annotations for a single variant.
operationId: seqvarsAnosQuery
- genes_info
summary: Query for annotations for one or more genes.
operationId: genesInfo
parameters:
- name: genome_release
in: query
description: Genome release specification.
required: true
schema:
type: string
- name: chromosome
in: query
description: Chromosome name.
required: true
schema:
type: string
- name: pos
in: query
description: 1-based position for VCF-style variant.
required: true
schema:
type: integer
format: int32
minimum: 0
- name: reference
in: query
description: Reference allele bases.
required: true
schema:
type: string
- name: alternative
- name: hgnc_id
in: query
description: Alterantive allele bases.
required: true
description: The HGNC IDs to search for.
required: false
schema:
type: string
type:
- array
- 'null'
items:
type: string
responses:
'200':
description: Annotation for a single variant.
description: Per-gene information.
content:
application/json:
schema:
$ref: '#/components/schemas/SeqvarsAnnosResponse'
$ref: '#/components/schemas/GenesInfoResponse'
'500':
description: Internal server error.
content:
Expand Down Expand Up @@ -163,6 +141,58 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/CustomError'
/api/v1/seqvars/annos:
get:
tags:
- annos_variant
summary: Query for annotations for a single variant.
operationId: seqvarsAnnosQuery
parameters:
- name: genome_release
in: query
description: Genome release specification.
required: true
schema:
type: string
- name: chromosome
in: query
description: Chromosome name.
required: true
schema:
type: string
- name: pos
in: query
description: 1-based position for VCF-style variant.
required: true
schema:
type: integer
format: int32
minimum: 0
- name: reference
in: query
description: Reference allele bases.
required: true
schema:
type: string
- name: alternative
in: query
description: Alterantive allele bases.
required: true
schema:
type: string
responses:
'200':
description: Annotation for a single variant.
content:
application/json:
schema:
$ref: '#/components/schemas/SeqvarsAnnosResponse'
'500':
description: Internal server error.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomError'
/api/v1/strucvars/clinvar/query:
get:
tags:
Expand Down
2 changes: 1 addition & 1 deletion src/server/run/annos_variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2831,7 +2831,7 @@ use response::*;
(status = 500, description = "Internal server error.", body = CustomError)
)
)]
#[get("/api/v1/genes/info")]
#[get("/api/v1/seqvars/annos")]
pub async fn handle_with_openapi(
data: Data<crate::server::run::WebServerData>,
_path: Path<()>,
Expand Down

0 comments on commit 5d902e4

Please sign in to comment.