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

fix: seqvarsAnnosQuery missing in OpenAPI spec #600

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
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
4 changes: 2 additions & 2 deletions src/server/run/annos_variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2824,14 +2824,14 @@ use response::*;
/// Query for annotations for a single variant.
#[utoipa::path(
get,
operation_id = "seqvarsAnosQuery",
operation_id = "seqvarsAnnosQuery",
params(SeqvarsAnnosQuery),
responses(
(status = 200, description = "Annotation for a single variant.", body = SeqvarsAnnosResponse),
(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
Loading