diff --git a/CHANGELOG.md b/CHANGELOG.md index 22fb0119640..a63f417254d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,20 @@ + +## [v2.30.1] - 2023-12-15 +## Bug Fixes + +* **event_handler:** allow responses and metadata when using Router ([#3514](https://github.com/aws-powertools/powertools-lambda-python/issues/3514)) + +## Maintenance + +* version bump +* **deps-dev:** bump aws-cdk from 2.114.1 to 2.115.0 ([#3508](https://github.com/aws-powertools/powertools-lambda-python/issues/3508)) +* **deps-dev:** bump the boto-typing group with 11 updates ([#3509](https://github.com/aws-powertools/powertools-lambda-python/issues/3509)) +* **deps-dev:** bump sentry-sdk from 1.39.0 to 1.39.1 ([#3512](https://github.com/aws-powertools/powertools-lambda-python/issues/3512)) + + ## [v2.30.0] - 2023-12-14 ## Bug Fixes @@ -4163,7 +4177,8 @@ * Merge pull request [#5](https://github.com/aws-powertools/powertools-lambda-python/issues/5) from jfuss/feat/python38 -[Unreleased]: https://github.com/aws-powertools/powertools-lambda-python/compare/v2.30.0...HEAD +[Unreleased]: https://github.com/aws-powertools/powertools-lambda-python/compare/v2.30.1...HEAD +[v2.30.1]: https://github.com/aws-powertools/powertools-lambda-python/compare/v2.30.0...v2.30.1 [v2.30.0]: https://github.com/aws-powertools/powertools-lambda-python/compare/v2.29.1...v2.30.0 [v2.29.1]: https://github.com/aws-powertools/powertools-lambda-python/compare/v2.29.0...v2.29.1 [v2.29.0]: https://github.com/aws-powertools/powertools-lambda-python/compare/v2.28.1...v2.29.0 diff --git a/aws_lambda_powertools/event_handler/api_gateway.py b/aws_lambda_powertools/event_handler/api_gateway.py index f68f186c333..172b57de277 100644 --- a/aws_lambda_powertools/event_handler/api_gateway.py +++ b/aws_lambda_powertools/event_handler/api_gateway.py @@ -559,7 +559,7 @@ def _openapi_operation_metadata(self, operation_ids: Set[str]) -> Dict[str, Any] # Ensure tags is added to the operation if self.tags: - operation["tags"] = [{"name": tag for tag in self.tags}] + operation["tags"] = self.tags # Ensure summary is added to the operation operation["summary"] = self._openapi_operation_summary() @@ -1375,7 +1375,7 @@ def get_openapi_schema( The title of the application. version: str The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API - openapi_version: str, default = "3.1.0" + openapi_version: str, default = "3.0.0" The version of the OpenAPI Specification (which the document uses). summary: str, optional A short summary of what the application does. @@ -1497,7 +1497,7 @@ def get_openapi_json_schema( The title of the application. version: str The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API - openapi_version: str, default = "3.1.0" + openapi_version: str, default = "3.0.0" The version of the OpenAPI Specification (which the document uses). summary: str, optional A short summary of what the application does. @@ -1567,7 +1567,7 @@ def enable_swagger( The title of the application. version: str The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API - openapi_version: str, default = "3.1.0" + openapi_version: str, default = "3.0.0" The version of the OpenAPI Specification (which the document uses). summary: str, optional A short summary of what the application does. diff --git a/aws_lambda_powertools/event_handler/openapi/models.py b/aws_lambda_powertools/event_handler/openapi/models.py index ab97b6dc2e7..e886e30d396 100644 --- a/aws_lambda_powertools/event_handler/openapi/models.py +++ b/aws_lambda_powertools/event_handler/openapi/models.py @@ -207,7 +207,7 @@ class Schema(BaseModel): readOnly: Optional[bool] = None writeOnly: Optional[bool] = None examples: Optional[List["Example"]] = None - # Ref: OpenAPI 3.1.0: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object + # Ref: OpenAPI 3.0.0: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md#schema-object # Schema Object discriminator: Optional[Discriminator] = None xml: Optional[XML] = None @@ -380,7 +380,7 @@ class Config: # https://swagger.io/specification/#operation-object class Operation(BaseModel): - tags: Optional[List[Tag]] = None + tags: Optional[List[str]] = None summary: Optional[str] = None description: Optional[str] = None externalDocs: Optional[ExternalDocumentation] = None diff --git a/aws_lambda_powertools/event_handler/openapi/swagger_ui/html.py b/aws_lambda_powertools/event_handler/openapi/swagger_ui/html.py index fdb38599f30..d8ffb0efa19 100644 --- a/aws_lambda_powertools/event_handler/openapi/swagger_ui/html.py +++ b/aws_lambda_powertools/event_handler/openapi/swagger_ui/html.py @@ -17,6 +17,10 @@ def generate_swagger_html(spec: str, js_url: str, css_url: str) -> str: