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

Fixes tags on /products routes to be Products instead of Product or undefined #98

Merged
merged 1 commit into from
Nov 11, 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
4 changes: 4 additions & 0 deletions src/stapi_fastapi/routers/product_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def __init__(
name=f"{self.root_router.name}:{self.product.id}:get-product",
methods=["GET"],
summary="Retrieve this product",
tags=["Products"],
)

self.add_api_route(
Expand All @@ -49,6 +50,7 @@ def __init__(
response_class=GeoJSONResponse,
response_model=OpportunityCollection[Geometry, self.product.constraints],
summary="Search Opportunities for the product",
tags=["Products"],
)

self.add_api_route(
Expand All @@ -57,6 +59,7 @@ def __init__(
name=f"{self.root_router.name}:{self.product.id}:get-constraints",
methods=["GET"],
summary="Get constraints for the product",
tags=["Products"],
)

self.add_api_route(
Expand All @@ -67,6 +70,7 @@ def __init__(
response_class=GeoJSONResponse,
status_code=status.HTTP_201_CREATED,
summary="Create an order for the product",
tags=["Products"],
)

def get_product(self, request: Request) -> Product:
Expand Down
2 changes: 1 addition & 1 deletion src/stapi_fastapi/routers/root_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(
self.get_products,
methods=["GET"],
name=f"{self.name}:list-products",
tags=["Product"],
tags=["Products"],
)

self.add_api_route(
Expand Down