Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Event Handler - Rest API - Example response.json in fined grained responses not formatted correctly #1223

Closed
michaelbrewer opened this issue May 20, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@michaelbrewer
Copy link
Contributor

michaelbrewer commented May 20, 2022

Expected Behaviour

response.json should be correctly formatted at https://awslabs.github.io/aws-lambda-powertools-python/latest/core/event_handler/api_gateway/#fine-grained-responses

Current Behaviour

Selecting response.json looks like this

Screen Shot 2022-05-20 at 1 10 32 PM

Code snippet

{ "body": "{\"message\":\"I\'m a teapot\"}", "headers": { "Content-Type": "application/json", "X-Custom": "X-Value" }, "isBase64Encoded": false, "statusCode": 418 }

Possible Solution

=== "response.json"

    ```json
    {
        "statusCode": 200,
        "headers": {
            "Content-Type": "application/json"
        },
        "body": "{\"message\":\"hello universe\"}",
        "isBase64Encoded": false
    }
    ```

Correctly format like PR #1117 and example deployed here https://gyft.github.io/aws-lambda-powertools-python/latest/core/event_handler/api_gateway/#fine-grained-responses

See screenshot of fix
Screen Shot 2022-05-20 at 1 16 52 PM

Steps to Reproduce

  1. Go to https://awslabs.github.io/aws-lambda-powertools-python/latest/core/event_handler/api_gateway/#fine-grained-responses
  2. Select response.json

AWS Lambda Powertools for Python version

latest

AWS Lambda function runtime

3.9

Packaging format used

PyPi

Debugging logs

N/A
@michaelbrewer michaelbrewer added bug Something isn't working triage Pending triage from maintainers labels May 20, 2022
@michaelbrewer michaelbrewer changed the title Docs: TITLE Docs: Rest API - Example response.json in fined grained responses not formatted correctly May 20, 2022
@michaelbrewer michaelbrewer changed the title Docs: Rest API - Example response.json in fined grained responses not formatted correctly Docs: Event Handler - Rest API - Example response.json in fined grained responses not formatted correctly May 20, 2022
@sthulb sthulb closed this as completed Jun 14, 2022
@github-actions
Copy link
Contributor

Comments on closed issues are hard for our team to see.

@heitorlessa heitorlessa removed the triage Pending triage from maintainers label Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants