diff --git a/docs/maintainers.md b/docs/maintainers.md index c1fbfbb64d1..4fd4f109a33 100644 --- a/docs/maintainers.md +++ b/docs/maintainers.md @@ -289,8 +289,9 @@ Add integration checks that validate pull requests and pushes to ease the burden ### Negative Impact on the Project - + Actions that negatively impact the project will be handled by the admins, in coordination with other maintainers, in balance with the urgency of the issue. Examples would be [Code of Conduct](https://github.com/aws-powertools/powertools-lambda-python/blob/develop/CODE_OF_CONDUCT.md){target="_blank"} violations, deliberate harmful or malicious actions, spam, monopolization, and security risks. + ### Becoming a maintainer diff --git a/docs/utilities/validation.md b/docs/utilities/validation.md index 7d822cf4b4c..1b569ddc14c 100644 --- a/docs/utilities/validation.md +++ b/docs/utilities/validation.md @@ -112,8 +112,9 @@ Here is a sample custom EventBridge event, where we only validate what's inside ```json --8<-- "examples/validation/src/getting_started_validator_unwrapping_payload.json" ``` - + This is quite powerful because you can use JMESPath Query language to extract records from [arrays](https://jmespath.org/tutorial.html#list-and-slice-projections){target="_blank" rel="nofollow"}, combine [pipe](https://jmespath.org/tutorial.html#pipe-expressions){target="_blank" rel="nofollow"} and [function expressions](https://jmespath.org/tutorial.html#functions){target="_blank" rel="nofollow"}. + When combined, these features allow you to extract what you need before validating the actual payload. @@ -141,16 +142,16 @@ We provide built-in envelopes to easily extract the payload from popular event s Here is a handy table with built-in envelopes along with their JMESPath expressions in case you want to build your own. -| Envelope | JMESPath expression | -| --------------------------------- | ------------------------------------------------------------------------ | -| **`API_GATEWAY_HTTP`** | `powertools_json(body)` | -| **`API_GATEWAY_REST`** | `powertools_json(body)` | -| **`CLOUDWATCH_EVENTS_SCHEDULED`** | `detail` | -| **`CLOUDWATCH_LOGS`** | `awslogs.powertools_base64_gzip(data) | powertools_json(@).logEvents[*]` | -| **`EVENTBRIDGE`** | `detail` | -| **`KINESIS_DATA_STREAM`** | `Records[*].kinesis.powertools_json(powertools_base64(data))` | -| **`SNS`** | `Records[0].Sns.Message | powertools_json(@)` | -| **`SQS`** | `Records[*].powertools_json(body)` | +| Envelope | JMESPath expression | +| --------------------------------- | ------------------------------------------------------------- | +| **`API_GATEWAY_HTTP`** | `powertools_json(body)` | +| **`API_GATEWAY_REST`** | `powertools_json(body)` | +| **`CLOUDWATCH_EVENTS_SCHEDULED`** | `detail` | +| **`CLOUDWATCH_LOGS`** | `awslogs.powertools_base64_gzip(data) | powertools_json(@).logEvents[*]` | +| **`EVENTBRIDGE`** | `detail` | +| **`KINESIS_DATA_STREAM`** | `Records[*].kinesis.powertools_json(powertools_base64(data))` | +| **`SNS`** | `Records[0].Sns.Message | powertools_json(@)` | +| **`SQS`** | `Records[*].powertools_json(body)` | ## Advanced