Skip to content

Commit 70bdf85

Browse files
author
Ran Isenberg
committed
fixes
1 parent 456e518 commit 70bdf85

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ This project aims to reduce cognitive load and answer these questions for you by
9393
- REST API protected by WAF with four AWS managed rules in production deployment
9494
- CloudWatch dashboards - High level and low level including CloudWatch alarms
9595
- Unit, infrastructure, security, integration and end to end tests.
96+
- Automatically generated OpenAPI endpoint: /swagger with Pydnatic schemas for both requests and responses
9697

9798

9899
## CDK Deployment

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ This project aims to reduce cognitive load and answer these questions for you by
4646
- Idempotent API
4747
- REST API protected by WAF with four AWS managed rules in production deployment
4848
- Unit, infrastructure, security, integration and E2E tests.
49+
- Automatically generated OpenAPI endpoint: /swagger with Pydnatic schemas for both requests and responses
4950

5051
The GitHub template project can be found at [https://github.com/ran-isenberg/aws-lambda-handler-cookbook](https://github.com/ran-isenberg/aws-lambda-handler-cookbook){:target="_blank" rel="noopener"}.
5152

service/handlers/handle_create_order.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
@app.post(
2121
ORDERS_PATH,
2222
summary='Create an order',
23-
description='Create an order identified by the body payload`',
23+
description='Create an order identified by the body payload',
2424
response_description='The created order',
2525
responses={
2626
200: {
@@ -32,7 +32,7 @@
3232
'content': {'application/json': {'schema': InternalServerErrorOutput.model_json_schema()}},
3333
},
3434
},
35-
tags=['CRUD', 'Orders'],
35+
tags=['CRUD'],
3636
)
3737
def handle_create_order(create_input: Annotated[CreateOrderRequest, Body(embed=False, media_type='application/json')]) -> CreateOrderOutput:
3838
env_vars: MyHandlerEnvVars = get_environment_variables(model=MyHandlerEnvVars)

service/handlers/utils/rest_api_resolver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
ORDERS_PATH = '/api/orders/'
1010

1111
app = APIGatewayRestResolver(enable_validation=True)
12-
app.enable_swagger(path='/swagger')
12+
app.enable_swagger(path='/swagger', title='AWS Lambda Handler Cookbook - Orders Service')
1313

1414

1515
@app.exception_handler(DynamicConfigurationException)

0 commit comments

Comments
 (0)