Browse Source

Add `viewport` meta tag to improve Swagger UI on mobile devices (#14777)

pull/14816/head
Joab 4 months ago
committed by GitHub
parent
commit
741f77d571
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      fastapi/openapi/docs.py

1
fastapi/openapi/docs.py

@ -139,6 +139,7 @@ def get_swagger_ui_html(
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link type="text/css" rel="stylesheet" href="{swagger_css_url}">
<link rel="shortcut icon" href="{swagger_favicon_url}">
<title>{title}</title>

Loading…
Cancel
Save