Skip to content

Bug: Swagger generated UI has JSON format invalid URL #3793

Closed
@ran-isenberg

Description

@ran-isenberg

Expected Behaviour

I deployed my API gateway to https://tzmt8vspl4.execute-api.us-east-1.amazonaws.com/prod/
It has the prod stage.
When i enter the /swagger URL, and click on the /swagger?format=json, i get the json file.

Current Behaviour

I get an invalid url and a permissions denied.
The generated URL there doesnt include the '/prod' part.

Code snippet

See https://github.com/ran-isenberg/aws-lambda-handler-cookbook/blob/main/cdk/service/api_construct.py the create swagger function.

Possible Solution

No response

Steps to Reproduce

Deploy the cookbook code.

Powertools for AWS Lambda (Python) version

latest

AWS Lambda function runtime

3.12

Packaging format used

PyPi

Debugging logs

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions