-
Notifications
You must be signed in to change notification settings - Fork 33
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
FastApi integration #13
Comments
You may need to slightly modify the source code of fastapi, similar to the following form: html = f"""
<!DOCTYPE html>
<html>
<head>
<title>{title}</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
"""
if with_google_fonts:
html += """
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
"""
html += f"""
<link rel="shortcut icon" href="{redoc_favicon_url}">
<style>
body {{
margin: 0;
padding: 0;
}}
</style>
</head>
<body>
- <redoc spec-url="{openapi_url}"></redoc>
- <script src="{redoc_js_url}"> </script>
+ <div id="redoc-container"></div>
+ <script src="//cdn.jsdelivr.net/npm/redoc@2.0.0-rc.48/bundles/redoc.standalone.min.js"> </script>
+ <script src="//cdn.jsdelivr.net/gh/wll8/redoc-try@1.3.4/dist/try.js"></script>
+ <script>
+ initTry({openapi_url})
+ </script>
</body>
</html>
""" |
For future references, to make it work, I had to change your code: |
Hahahaha, I'm very sorry, I gave the untested reference code. I am very happy to be able to help you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I'm currently using python's library FastAPI to make the endpoints and generate its Redoc documentation, is there any way to integrate your project using FastApi library?
The text was updated successfully, but these errors were encountered: