Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7119a29

Browse files
committedDec 18, 2023
fix(event-handler): upgrade Swagger UI to fix regressions
1 parent 49c5ab1 commit 7119a29

File tree

3 files changed

+25
-13
lines changed

3 files changed

+25
-13
lines changed
 

‎aws_lambda_powertools/event_handler/openapi/swagger_ui/html.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ def generate_swagger_html(spec: str, js_url: str, css_url: str) -> str:
1717
<head>
1818
<meta charset="UTF-8">
1919
<title>Swagger UI</title>
20+
<meta
21+
http-equiv="Cache-control"
22+
content="no-cache, no-store, must-revalidate"
23+
/>
2024
<link rel="stylesheet" type="text/css" href="{css_url}">
2125
</head>
2226
@@ -34,6 +38,9 @@ def generate_swagger_html(spec: str, js_url: str, css_url: str) -> str:
3438
docExpansion: "list",
3539
deepLinking: true,
3640
filter: true,
41+
layout: "BaseLayout",
42+
showExtensions: true,
43+
showCommonExtensions: true,
3744
spec: JSON.parse(`
3845
{spec}
3946
`.trim()),

‎aws_lambda_powertools/event_handler/openapi/swagger_ui/swagger-ui-bundle.min.js

Lines changed: 9 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎aws_lambda_powertools/event_handler/openapi/swagger_ui/swagger-ui.min.css

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.