-
Notifications
You must be signed in to change notification settings - Fork 437
Closed
Labels
Description
Use case
This is a continuation of the work on the RFC #2421
Now that we've merged the code to add OpenAPI generation and runtime validation, we want to optionally enable a Swagger UI so the consumers can explore the API provided by the Lambda function.
NOTE: this ticket is not yet for customers using micro-functions. This is only useful for customers with a single Lambda with many routes.
Solution/User Experience
See here for the discussion.
We should create a new enable_swagger
method on all the API resolvers that will create all the necessary endpoints to server the Swagger UI. Optionally the user can pass middlewares
if additional security / authorization is needed.
app = APIGatewayRestResolver(enable_validation=True)
app.enable_swagger(path="/swagger")
Additional features include:
- ability to override the Swagger base path, so other versions can be saved
- ability to customize the OpenAPI metadata
- automatic detection of the base path for Rest/Http gateways
Alternative solutions
N/A
Acknowledgment
- This feature request meets Powertools for AWS Lambda (Python) TenetsShould this be considered in other Powertools for AWS Lambda languages? i.e. Java, TypeScript, and .NETTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Shipped
Activity
github-actions commentedon Nov 6, 2023
This issue is now closed. Please be mindful that future comments are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
github-actions commentedon Nov 10, 2023
This is now released under 2.26.1 version!