Skip to content

Commit 0edec8e

Browse files
author
Michael Brewer
authored
docs: Correct link targets and line highlights (#390)
* docs: Correct links and line highlights Changes: - Use target _blank for external links - Correct some of the line highlighted in the examples - Fix links to Tracer * docs: Correct internal links to tracer * docs: Include .md in internal links
1 parent 48ffc2a commit 0edec8e

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

Diff for: docs/core/event_handler/appsync.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This is the sample infrastructure we are using for the initial examples with a A
3232
=== "schema.graphql"
3333

3434
!!! tip "Designing GraphQL Schemas for the first time?"
35-
Visit [AWS AppSync schema documentation](https://docs.aws.amazon.com/appsync/latest/devguide/designing-your-schema.html) for understanding how to define types, nesting, and pagination.
35+
Visit [AWS AppSync schema documentation](https://docs.aws.amazon.com/appsync/latest/devguide/designing-your-schema.html){target="_blank"} for understanding how to define types, nesting, and pagination.
3636

3737
```typescript
3838
--8<-- "docs/shared/getting_started_schema.graphql"
@@ -183,7 +183,7 @@ Here's an example where we have two separate functions to resolve `getTodo` and
183183

184184
=== "app.py"
185185

186-
```python hl_lines="3-4 8 30-31 38-39 46"
186+
```python hl_lines="3-5 9 31-32 39-40 47"
187187
from aws_lambda_powertools import Logger, Tracer
188188

189189
from aws_lambda_powertools.logging import correlation_paths
@@ -428,7 +428,7 @@ Assuming you have [Amplify CLI installed](https://docs.amplify.aws/cli/start/ins
428428

429429
=== "schema.graphql"
430430

431-
```typescript hl_lines="8 10 18 23 25"
431+
```typescript hl_lines="7 15 20 22"
432432
@model
433433
type Merchant {
434434
id: String!

Diff for: docs/index.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -141,18 +141,18 @@ aws serverlessrepo list-application-versions \
141141

142142
| Utility | Description
143143
| ------------------------------------------------- | ---------------------------------------------------------------------------------
144-
| [Tracing](./core/tracer) | Decorators and utilities to trace Lambda function handlers, and both synchronous and asynchronous functions
145-
| [Logger](./core/logger) | Structured logging made easier, and decorator to enrich structured logging with key Lambda context details
146-
| [Metrics](./core/metrics) | Custom Metrics created asynchronously via CloudWatch Embedded Metric Format (EMF)
144+
| [Tracing](./core/tracer.md) | Decorators and utilities to trace Lambda function handlers, and both synchronous and asynchronous functions
145+
| [Logger](./core/logger.md) | Structured logging made easier, and decorator to enrich structured logging with key Lambda context details
146+
| [Metrics](./core/metrics.md) | Custom Metrics created asynchronously via CloudWatch Embedded Metric Format (EMF)
147147
| [Event handler](./core/event_handler) | Event handler decorators for common Lambda events
148-
| [Middleware factory](./utilities/middleware_factory) | Decorator factory to create your own middleware to run logic before, and after each Lambda invocation
149-
| [Parameters](./utilities/parameters) | Retrieve parameter values from AWS Systems Manager Parameter Store, AWS Secrets Manager, or Amazon DynamoDB, and cache them for a specific amount of time
150-
| [Batch processing](./utilities/batch) | Handle partial failures for AWS SQS batch processing
151-
| [Typing](./utilities/typing) | Static typing classes to speedup development in your IDE
152-
| [Validation](./utilities/validation) | JSON Schema validator for inbound events and responses
153-
| [Event source data classes](./utilities/data_classes) | Data classes describing the schema of common Lambda event triggers
154-
| [Parser](./utilities/parser) | Data parsing and deep validation using Pydantic
155-
| [Idempotency](./utilities/idempotency) | Idempotent Lambda handler
148+
| [Middleware factory](./utilities/middleware_factory.md) | Decorator factory to create your own middleware to run logic before, and after each Lambda invocation
149+
| [Parameters](./utilities/parameters.md) | Retrieve parameter values from AWS Systems Manager Parameter Store, AWS Secrets Manager, or Amazon DynamoDB, and cache them for a specific amount of time
150+
| [Batch processing](./utilities/batch.md) | Handle partial failures for AWS SQS batch processing
151+
| [Typing](./utilities/typing.md) | Static typing classes to speedup development in your IDE
152+
| [Validation](./utilities/validation.md) | JSON Schema validator for inbound events and responses
153+
| [Event source data classes](./utilities/data_classes.md) | Data classes describing the schema of common Lambda event triggers
154+
| [Parser](./utilities/parser.md) | Data parsing and deep validation using Pydantic
155+
| [Idempotency](./utilities/idempotency.md) | Idempotent Lambda handler
156156

157157
## Environment variables
158158

Diff for: docs/utilities/middleware_factory.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ This makes use of an existing Tracer instance that you may have initialized anyw
7878
...
7979
```
8080

81-
When executed, your middleware name will [appear in AWS X-Ray Trace details as](../core/tracer) `## middleware_name`.
81+
When executed, your middleware name will [appear in AWS X-Ray Trace details as](../core/tracer.md) `## middleware_name`.
8282

83-
For advanced use cases, you can instantiate [Tracer](../core/tracer) inside your middleware, and add annotations as well as metadata for additional operational insights.
83+
For advanced use cases, you can instantiate [Tracer](../core/tracer.md) inside your middleware, and add annotations as well as metadata for additional operational insights.
8484

8585
=== "app.py"
8686

@@ -100,7 +100,7 @@ For advanced use cases, you can instantiate [Tracer](../core/tracer) inside your
100100

101101
* Use `trace_execution` to quickly understand the performance impact of your middlewares, and reduce or merge tasks when necessary
102102
* When nesting multiple middlewares, always return the handler with event and context, or response
103-
* Keep in mind [Python decorators execution order](https://realpython.com/primer-on-python-decorators/#nesting-decorators). Lambda handler is actually called once (top-down)
103+
* Keep in mind [Python decorators execution order](https://realpython.com/primer-on-python-decorators/#nesting-decorators){target="_blank"}. Lambda handler is actually called once (top-down)
104104
* Async middlewares are not supported
105105

106106
## Testing your code

Diff for: docs/utilities/validation.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You can validate inbound and outbound events using [`validator` decorator](#vali
2020

2121
You can also use the standalone `validate` function, if you want more control over the validation process such as handling a validation error.
2222

23-
We support any JSONSchema draft supported by [fastjsonschema](https://horejsek.github.io/python-fastjsonschema/) library.
23+
We support any JSONSchema draft supported by [fastjsonschema](https://horejsek.github.io/python-fastjsonschema/){target="_blank"} library.
2424

2525
!!! warning
2626
Both `validator` decorator and `validate` standalone function expects your JSON Schema to be a **dictionary**, not a filename.
@@ -184,7 +184,7 @@ Envelope name | JMESPath expression
184184
### Validating custom formats
185185

186186
!!! note "New in 1.10.0"
187-
JSON Schema DRAFT 7 [has many new built-in formats](https://json-schema.org/understanding-json-schema/reference/string.html#format) such as date, time, and specifically a regex format which might be a better replacement for a custom format, if you do have control over the schema.
187+
JSON Schema DRAFT 7 [has many new built-in formats](https://json-schema.org/understanding-json-schema/reference/string.html#format){target="_blank"} such as date, time, and specifically a regex format which might be a better replacement for a custom format, if you do have control over the schema.
188188

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

@@ -528,7 +528,7 @@ This sample will decompress and decode base64 data, then use JMESPath pipeline e
528528

529529
This will **replace all provided built-in functions such as `powertools_json`, so you will no longer be able to use them**.
530530

531-
For special binary formats that you want to decode before applying JSON Schema validation, you can bring your own [JMESPath function](https://github.com/jmespath/jmespath.py#custom-functions) and any additional option via `jmespath_options` param.
531+
For special binary formats that you want to decode before applying JSON Schema validation, you can bring your own [JMESPath function](https://github.com/jmespath/jmespath.py#custom-functions){target="_blank"} and any additional option via `jmespath_options` param.
532532

533533
=== "custom_jmespath_function.py"
534534

0 commit comments

Comments
 (0)