From 27c74ada422cfbc7853347931348c3aaa4465eee Mon Sep 17 00:00:00 2001 From: Gaurav Vaidya Date: Sat, 16 May 2026 01:11:46 -0400 Subject: [PATCH] Fix descriptions of the `limit` GET/POST parameter. Closes #269. --- api/server.py | 6 +++--- documentation/API.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/server.py b/api/server.py index 011c5d2b..9f1fcc08 100755 --- a/api/server.py +++ b/api/server.py @@ -281,7 +281,7 @@ async def lookup_curies_get( ge=0 )] = 0, limit: Annotated[int, Query( - description="The number of results to skip. Can be used to page through the results of a query.", + description="The number of results to return. Can be used to page through the results of a query.", # Limit should be greater than or equal to zero and less than or equal to 1000. ge=0, le=1000 @@ -345,7 +345,7 @@ async def lookup_curies_post( ge=0 )] = 0, limit: Annotated[int, Query( - description="The number of results to skip. Can be used to page through the results of a query.", + description="The number of results to return. Can be used to page through the results of a query.", # Limit should be greater than or equal to zero and less than or equal to 1000. ge=0, le=1000 @@ -638,7 +638,7 @@ class NameResQuery(BaseModel): ) limit: Optional[int] = Field( 10, - description="The number of results to skip. Can be used to page through the results of a query.", + description="The number of results to return. Can be used to page through the results of a query.", # Limit should be greater than or equal to zero and less than or equal to 1000. ge=0, le=1000 diff --git a/documentation/API.md b/documentation/API.md index 57bcbdea..5311a2d5 100644 --- a/documentation/API.md +++ b/documentation/API.md @@ -122,7 +122,7 @@ Search for cliques by a fragment of a name or synonym. - `autocomplete` (optional, boolean, default: false): If `true`, treats the input string as incomplete and looks for terms that start with the final word. If `false`, treats the entire phrase as complete (entity linker mode). - `highlighting` (optional, boolean, default: false): If `true`, returns information on which labels and synonyms matched the search query. - `offset` (optional, integer, default: 0, minimum: 0): The number of results to skip. Used for pagination. -- `limit` (optional, integer, default: 10, minimum: 0, maximum: 1000): The maximum number of results to return. Used for pagination. +- `limit` (optional, integer, default: 10, minimum: 0, maximum: 1000): The number of results to return. Used for pagination. - `biolink_type` (optional, list of strings): Filter results to specific Biolink types. Types can be specified with or without the `biolink:` prefix (e.g., `biolink:Disease` or `Disease`). Multiple types are combined with OR logic, so filtering for `PhenotypicFeature` and `Disease` will return concepts that are either phenotypic features OR diseases. - `only_prefixes` (optional, string): Pipe-separated, case-sensitive list of CURIE prefixes to include (e.g., `MONDO|EFO`). Only results with matching prefixes will be returned. - `exclude_prefixes` (optional, string): Pipe-separated, case-sensitive list of CURIE prefixes to exclude (e.g., `UMLS|EFO`). Results with matching prefixes will be filtered out.