Skip to content

Add OpenAPI spec for species search

Andrey Azov requested to merge add-species-search-spec into master

Jira ticket: https://www.ebi.ac.uk/panda/jira/browse/ENSWBSITES-2024

Note that the proposed path, and the name of the query parameter, are different from what is suggested in the description of the ticket.

The typescript equivalent of the proposed schema is:

type SpeciesSearchMatch = {
  genome_id: string;
  genome_tag: string | null;
  common_name: string | null;
  scientific_name: string;
  type: {
    kind: string; // e.g. "population"
    value: string; // e.g. "European"
  } | null;
  is_reference: boolean;
  assembly: {
    accession_id: string;
    name: string;
    url: string;
  };
  coding_genes_count: number;
  contig_n50: number | null; // E.coli doesn't have contig n50 in species stats
  has_variation: boolean;
  has_regulation: boolean;
  annotation_provider: string;
  annotation_method: string;
  rank: number | null; // <-- to know that some matches are more important than others and should be put on top
};

type SpeciesSearchRequest = {
  query: string;
};

type SpeciesSearchResponse = {
  matches: SpeciesSearchMatch[];
  meta: {
    total_count: number;
  }
};

Merge request reports