Skip to content

Commit 7822852

Browse files
committed
docs(validation): update single code blocks to title
1 parent 585b286 commit 7822852

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

docs/utilities/typing.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ This typing utility provides static typing classes that can be used to ease the
1111

1212
The `LambdaContext` typing is typically used in the handler method for the Lambda function.
1313

14-
=== "index.py"
14+
```python hl_lines="4" title="Annotating Lambda context type"
15+
from typing import Any, Dict
16+
from aws_lambda_powertools.utilities.typing import LambdaContext
1517

16-
```python hl_lines="4"
17-
from typing import Any, Dict
18-
from aws_lambda_powertools.utilities.typing import LambdaContext
19-
20-
def handler(event: Dict[str, Any], context: LambdaContext) -> Dict[str, Any]:
21-
# Insert business logic
22-
return event
23-
```
18+
def handler(event: Dict[str, Any], context: LambdaContext) -> Dict[str, Any]:
19+
# Insert business logic
20+
return event
21+
```

docs/utilities/validation.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,14 @@ Envelope name | JMESPath expression
186186

187187
JSON Schemas with custom formats like `int64` will fail validation. If you have these, you can pass them using `formats` parameter:
188188

189-
=== "custom_json_schema_type_format.json"
190-
191-
```json
192-
{
193-
"lastModifiedTime": {
194-
"format": "int64",
195-
"type": "integer"
196-
}
197-
}
198-
```
189+
```json title="custom_json_schema_type_format.json"
190+
{
191+
"lastModifiedTime": {
192+
"format": "int64",
193+
"type": "integer"
194+
}
195+
}
196+
```
199197

200198
For each format defined in a dictionary key, you must use a regex, or a function that returns a boolean to instruct the validator on how to proceed when encountering that type.
201199

0 commit comments

Comments
 (0)