Skip to content

Commit

Permalink
50 bug wrong response type for glom (#52)
Browse files Browse the repository at this point in the history
* #50 bug wrong response type for glom

WIP: Reproducing bug

* #50 bug wrong response type for glom

WIP: Reproducing bug

* #50 bug wrong response type for glom

Refactoring glom usage

* #50 bug wrong response type for glom

Refactoring glom usage

* #50 bug wrong response type for glom

Refactoring naming

Added description

* #50 bug wrong response type for glom

Refactoring naming

Forcing glom to return empty strings instead of none for missing description

* #50 bug wrong response type for glom

Refactoring enum unions

* #50 bug wrong response type for glom

Refactoring CollectionAttributes

* #50 bug wrong response type for glom

Refactoring CollectionAttributes

* #50 bug wrong response type for glom

Refactoring and cleanup, removing outdated logic and code

Adding documentation

* #50 bug wrong response type for glom

Cleanup

* #50 bug wrong response type for glom

Refactoring attribute names

* #50 bug wrong response type for glom

Refactoring attribute names
  • Loading branch information
RobertMeissner authored Jun 22, 2022
1 parent 2b33ccc commit 0553c86
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/app/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def node_ids_for_major_collections(
description=QUALITY_MATRIX_DESCRIPTION,
)
async def get_quality(
*,
database: Database = Depends(get_database),
node_id: str = Query(
default=COLLECTION_ROOT_ID,
Expand Down Expand Up @@ -124,7 +125,7 @@ async def get_quality(
description="""An unix timestamp in integer seconds since epoch yields the quality matrix at the respective date.""",
)
async def get_past_quality_matrix(
timestamp: int, database: Database = Depends(get_database)
*, timestamp: int, database: Database = Depends(get_database)
):
if not timestamp:
raise HTTPException(status_code=400, detail="Invalid or no timestamp given")
Expand Down Expand Up @@ -155,6 +156,7 @@ async def get_past_quality_matrix(
form: The desired form of quality. This is used to query only the relevant type of data.""",
)
async def get_timestamps(
*,
database: Database = Depends(get_database),
form: Forms = Query(
default=Forms.REPLICATION_SOURCE,
Expand Down Expand Up @@ -268,12 +270,12 @@ async def get_collection_counts(
)
async def filter_collections_with_missing_attributes(
*,
noderef_id: UUID = Depends(node_ids_for_major_collections),
node_id: UUID = Depends(node_ids_for_major_collections),
missing_attribute: str = Path(
...,
examples={
form.name: {"value": form.value} for form in missing_attribute_filter
},
),
):
return await collections_with_missing_attributes(noderef_id, missing_attribute)
return await collections_with_missing_attributes(node_id, missing_attribute)

0 comments on commit 0553c86

Please sign in to comment.